Messages in this thread | | | From | Eric PAIRE <> | Subject | BUG in TCP for multithreaded apps | Date | Thu, 09 Dec 1999 11:20:25 +0100 |
| |
Hi Linux gurus,
I would like to point out a bug in the Linux TCP implementation which only appears with multithreaded applications. If a thread is doing a select() on a file descriptor which is a socket in LISTEN state, and another thread is closing the file descriptor, then select() does not return (with EBADF set).
My guess is that in tcp_close() for the special case state == TCP_LISTEN, there is no call to sk->state_change(sk) before it is marked as dead.
Of course, this is just for the case of multithreaded apps, since select() checks for fd validity on entry...
Best regards, -Eric +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE Web : http://www.ri.silicomp.com/~paire | Group SILICOMP - Research Institute Email: eric.paire@ri.silicomp.com | 2, avenue de Vignate Phone: +33 (0) 476 63 48 71 | F-38610 Gieres Fax : +33 (0) 476 51 05 32 | FRANCE
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |