[lkml]   [2001]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: tcp_recvmsg() in 2.4.4

Eric Barton writes:
> When it get to if(sk->state == TCP_CLOSE), surely sk->done has already been
> tested (and the socket is locked), so -ENOTCONN could be returned
> immediately.

We sleep and drop the lock during these loops, so we need to retest
this each time we wake back up.

> Actually I'd really appreciate it if someone could explain the order of
> tests for sk->done, sk->err, sk->shutdown and sk->state...

Most of the error test ordering is specified by POSIX somewhere.

Alan would know better.

David S. Miller
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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