From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+c2e074db555379260750@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] general protection fault in find_lock_task_mm
Date: Tue, 17 Dec 2024 19:15:10 +0800 [thread overview]
Message-ID: <20241217111514.207-1-hdanton@sina.com> (raw)
In-Reply-To: <67607c8c.050a0220.37aaf.013a.GAE@google.com>
On Mon, 16 Dec 2024 11:16:28 -0800
> syzbot found the following issue on:
>
> HEAD commit: 231825b2e1ff Revert "unicode: Don't special case ignorable..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=102844f8580000
#syz test
--- x/mm/oom_kill.c
+++ y/mm/oom_kill.c
@@ -137,7 +137,10 @@ struct task_struct *find_lock_task_mm(st
rcu_read_lock();
for_each_thread(p, t) {
+ if (!tryget_task_struct(t))
+ continue;
task_lock(t);
+ put_task_struct(t);
if (likely(t->mm))
goto found;
task_unlock(t);
--- x/include/net/neighbour.h
+++ y/include/net/neighbour.h
@@ -302,8 +302,11 @@ static inline struct neighbour *___neigh
struct neigh_hash_table *nht = rcu_dereference(tbl->nht);
struct neighbour *n;
u32 hash_val;
+ u32 shift = 32 - nht->hash_shift;
- hash_val = hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
+ if (shift > 31)
+ shift = 31;
+ hash_val = hash(pkey, dev, nht->hash_rnd) >> shift;
neigh_for_each_in_bucket_rcu(n, &nht->hash_heads[hash_val])
if (n->dev == dev && key_eq(n, pkey))
return n;
--
next prev parent reply other threads:[~2024-12-17 11:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 19:16 [syzbot] [mm?] general protection fault in find_lock_task_mm syzbot
2024-12-17 10:31 ` Hillf Danton
2024-12-17 10:48 ` syzbot
2024-12-17 11:15 ` Hillf Danton [this message]
2024-12-17 11:34 ` syzbot
2025-01-04 14:30 ` Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241217111514.207-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+c2e074db555379260750@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox