All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+4e21d5f67b886a692b55@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [fs?] BUG: corrupted list in remove_wait_queue (2)
Date: Sun, 16 Feb 2025 23:26:39 -0800	[thread overview]
Message-ID: <67b2e4af.050a0220.54b41.000e.GAE@google.com> (raw)
In-Reply-To: <67917ed8.050a0220.15cac.02eb.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [fs?] BUG: corrupted list in remove_wait_queue (2)
Author: lizhi.xu@windriver.com

#syz test

diff --git a/fs/select.c b/fs/select.c
index 7da531b1cf6b..63dd2fb58447 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -977,6 +977,7 @@ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
  	struct poll_list *walk = head;
 	unsigned int todo = nfds;
 	unsigned int len;
+	static DEFINE_MUTEX(syspoll_lock);
 
 	if (nfds > rlimit(RLIMIT_NOFILE))
 		return -EINVAL;
@@ -1005,9 +1006,11 @@ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
 		}
 	}
 
+	mutex_lock(&syspoll_lock);
 	poll_initwait(&table);
 	fdcount = do_poll(head, &table, end_time);
 	poll_freewait(&table);
+	mutex_unlock(&syspoll_lock);
 
 	if (!user_write_access_begin(ufds, nfds * sizeof(*ufds)))
 		goto out_fds;

  reply	other threads:[~2025-02-17  7:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 23:27 [syzbot] [fs?] BUG: corrupted list in remove_wait_queue (2) syzbot
2025-02-17  7:26 ` syzbot [this message]
2025-07-07  9:30 ` syzbot
2025-07-07 11:26   ` Hillf Danton
2025-07-07 11:43     ` syzbot
2026-01-15 23:32 ` syzbot

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=67b2e4af.050a0220.54b41.000e.GAE@google.com \
    --to=syzbot+4e21d5f67b886a692b55@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.