lkml.org 
[lkml]   [2003]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROBLEM: Bug in __pollwait() can cause select() and poll() to hang in
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.036 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site