* [PATCH] workingset: add missing rcu_read_unlock() in lru_gen_refault()
[not found] <0000000000004c3e6b05fb414be2@google.com>
@ 2023-05-09 22:22 ` Tetsuo Handa
2023-05-09 23:12 ` Johannes Weiner
2023-05-09 23:59 ` Nhat Pham
0 siblings, 2 replies; 3+ messages in thread
From: Tetsuo Handa @ 2023-05-09 22:22 UTC (permalink / raw)
To: syzbot, syzkaller-bugs, Andrew Morton, Johannes Weiner, Nhat Pham
Cc: linux-mm
syzbot is reporting sleep in RCU context, for commit d66c718d28ac
("workingset: refactor LRU refault to expose refault recency check")
missed rcu_read_unlock().
Reported-by: syzbot <syzbot+3c6cac1550288f8e7060@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=3c6cac1550288f8e7060
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: d66c718d28ac ("workingset: refactor LRU refault to expose refault recency check")
---
mm/workingset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/workingset.c b/mm/workingset.c
index d81f9dafc9f1..90ae785d4c9c 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -303,7 +303,7 @@ static void lru_gen_refault(struct folio *folio, void *shadow)
goto unlock;
if (pgdat != folio_pgdat(folio))
- return;
+ goto unlock;
lruvec = mem_cgroup_lruvec(memcg, pgdat);
lrugen = &lruvec->lrugen;
--
2.18.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] workingset: add missing rcu_read_unlock() in lru_gen_refault()
2023-05-09 22:22 ` [PATCH] workingset: add missing rcu_read_unlock() in lru_gen_refault() Tetsuo Handa
@ 2023-05-09 23:12 ` Johannes Weiner
2023-05-09 23:59 ` Nhat Pham
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Weiner @ 2023-05-09 23:12 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: syzbot, syzkaller-bugs, Andrew Morton, Nhat Pham, linux-mm
On Wed, May 10, 2023 at 07:22:55AM +0900, Tetsuo Handa wrote:
> syzbot is reporting sleep in RCU context, for commit d66c718d28ac
> ("workingset: refactor LRU refault to expose refault recency check")
> missed rcu_read_unlock().
>
> Reported-by: syzbot <syzbot+3c6cac1550288f8e7060@syzkaller.appspotmail.com>
> Closes: https://syzkaller.appspot.com/bug?extid=3c6cac1550288f8e7060
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: d66c718d28ac ("workingset: refactor LRU refault to expose refault recency check")
Oops! Thanks for the fix.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] workingset: add missing rcu_read_unlock() in lru_gen_refault()
2023-05-09 22:22 ` [PATCH] workingset: add missing rcu_read_unlock() in lru_gen_refault() Tetsuo Handa
2023-05-09 23:12 ` Johannes Weiner
@ 2023-05-09 23:59 ` Nhat Pham
1 sibling, 0 replies; 3+ messages in thread
From: Nhat Pham @ 2023-05-09 23:59 UTC (permalink / raw)
To: Tetsuo Handa
Cc: Andrew Morton, Johannes Weiner, linux-mm, syzbot, syzkaller-bugs
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
On Tue, May 9, 2023 at 3:23 PM Tetsuo Handa <
penguin-kernel@i-love.sakura.ne.jp> wrote:
> syzbot is reporting sleep in RCU context, for commit d66c718d28ac
> ("workingset: refactor LRU refault to expose refault recency check")
> missed rcu_read_unlock().
>
> Reported-by: syzbot <syzbot+3c6cac1550288f8e7060@syzkaller.appspotmail.com
> >
> Closes: https://syzkaller.appspot.com/bug?extid=3c6cac1550288f8e7060
> Signed-off-by
> <https://syzkaller.appspot.com/bug?extid=3c6cac1550288f8e7060Signed-off-by>:
> Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: d66c718d28ac ("workingset: refactor LRU refault to expose refault
> recency check")
> ---
> mm/workingset.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/workingset.c b/mm/workingset.c
> index d81f9dafc9f1..90ae785d4c9c 100644
> --- a/mm/workingset.c
> +++ b/mm/workingset.c
> @@ -303,7 +303,7 @@ static void lru_gen_refault(struct folio *folio, void
> *shadow)
> goto unlock;
>
> if (pgdat != folio_pgdat(folio))
> - return;
> + goto unlock;
>
> lruvec = mem_cgroup_lruvec(memcg, pgdat);
> lrugen = &lruvec->lrugen;
> --
> 2.18.4
>
Thanks for the fix!
Acked-by: Nhat Pham <nphamcs@gmail.com>
>
>
[-- Attachment #2: Type: text/html, Size: 2206 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-09 23:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0000000000004c3e6b05fb414be2@google.com>
2023-05-09 22:22 ` [PATCH] workingset: add missing rcu_read_unlock() in lru_gen_refault() Tetsuo Handa
2023-05-09 23:12 ` Johannes Weiner
2023-05-09 23:59 ` Nhat Pham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox