From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+9c28ada89c468ad30713@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kernel?] WARNING in futex_pivot_pending
Date: Mon, 17 Aug 2026 12:48:42 +0800 [thread overview]
Message-ID: <tencent_394AEE36CC647BBE6DBC2CD16D4C97D0E80A@qq.com> (raw)
In-Reply-To: <6a807971.dbb3a75c.20434b.0018.GAE@google.com>
#syz test
diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 128c5752f225..a0b17d2f41da 100644
--- a/kernel/futex/core.c
+++ b/kernel/futex/core.c
@@ -1785,14 +1785,24 @@ static bool futex_pivot_pending(struct mm_struct *mm)
{
struct futex_mm_phash *mmph = &mm->futex.phash;
struct futex_private_hash *fph;
+ unsigned int state;
+ bool ret;
+
+ state = current->__state;
+ __set_current_state(TASK_RUNNING);
+ scoped_guard(mutex, &mmph->lock) {
+ if (!mmph->hash_new) {
+ ret = true;
+ goto out;
+ }
- guard(mutex)(&mmph->lock);
-
- if (!mmph->hash_new)
- return true;
+ fph = rcu_dereference_raw(mmph->hash);
+ ret = futex_ref_is_dead(fph);
+ }
+out:
+ __set_current_state(state);
+ return ret;
- fph = rcu_dereference_raw(mmph->hash);
- return futex_ref_is_dead(fph);
}
static bool futex_hash_less(struct futex_private_hash *a,
next prev parent reply other threads:[~2026-08-17 4:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 14:36 syzbot
2026-08-16 2:25 ` Edward Adam Davis
2026-08-16 2:50 ` syzbot
2026-08-17 4:48 ` Edward Adam Davis [this message]
2026-08-17 5:18 ` syzbot
2026-08-17 5:33 ` [PATCH] futex: Temporarily set the task state to running for pivot pending Edward Adam Davis
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=tencent_394AEE36CC647BBE6DBC2CD16D4C97D0E80A@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+9c28ada89c468ad30713@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
all inboxes | Powered by JetHome®