]> git.baikalelectronics.ru Git - kernel.git/commit
Fix timeouts in sys_pselect7
authorBernd Schmidt <bernds_cb1@t-online.de>
Tue, 13 Jan 2009 21:14:48 +0000 (22:14 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Jan 2009 22:45:17 +0000 (14:45 -0800)
commit5b9eabbbf6f8f691ced64abfafb2b538ada87a08
tree6a0d4d7b6d50737c1bfcf93a74ad46855c244dc9
parentf3d1ed043200ed23cafcf23a144f0b726197afe6
Fix timeouts in sys_pselect7

Since we (Analog Devices) updated our Blackfin kernel to 2.6.28, we've
seen occasional 5-second hangs from telnet.  telnetd calls select with a
NULL timeout, but with the new kernel, the system call occasionally
returns 0, which causes telnet to call sleep (5).  This did not happen
with earlier kernels.

The code in sys_pselect7 looks a bit strange, in particular the variable
"to" is initialized to NULL, then changed if a non-null timeout was
passed in, but not used further.  It needs to be passed to
core_sys_select instead of &end_time.

This bug was introduced by bac1c2b7be2d0a3c52526488f024def721880ca7
("select: switch select() and poll() over to hrtimers").

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Reviewed-by: Ulrich Drepper <drepper@redhat.com>
Tested-by: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/select.c