From: Manfred Spraul <manfred@colorfullife.com>
To: Ray Bryant <raybry@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: Bug in __pollwait() can cause select() and poll() to hang in
Date: Thu, 19 Jun 2003 18:13:42 +0200 [thread overview]
Message-ID: <3EF1E136.40305@colorfullife.com> (raw)
Hi Ray,
your bug description seems to be correct, but the fix is wrong:
If the allocation is for the 2nd page of wait queue heads, then
"current->state = TASK_INTERRUPTIBLE" can lead to lost wakeups, if an fd
that is stored in the first page gets ready during the allocation.
Setting the state to interruptible is only permitted if a full scan of
all file descriptors happens before calling schedule(). This is
expensive and should be avoided.
The correct fix is current->state = TASK_RUNNING just before calling
yield() in the rebalance code.
--
Manfred
next reply other threads:[~2003-06-19 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-19 16:13 Manfred Spraul [this message]
2003-06-19 18:09 ` PROBLEM: Bug in __pollwait() can cause select() and poll() tohang in Ray Bryant
2003-06-19 18:21 ` Andrew Morton
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=3EF1E136.40305@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raybry@sgi.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