lkml.org 
[lkml]   [1999]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectBUG in TCP for multithreaded apps
Date
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/

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