wait-queues vs socket-locking

Arjan van de Ven (arjan@fenrus.demon.nl)
Sat, 14 Aug 1999 11:44:21 +0200 (CEST)


Hi,

Just a simple question about sock-locking and wait-queues.
As far as I can see, most of the TCP/IP code makes sure
that the "struct sock" is locked (lock_sock(sk)) before adding or removing
tasks from the sk->sleep waitqueue. But wait_for_tcp_memory
(/net/ipv4/tcp.c line 707) explicitly doesn't.

Is it required to "lock the sock" before modifing the sk->sleep waitqueue,
or is it safe not to have the sock locked?

(All kernel 2.3.13)

Greetings,
Arjan van de Ven

-
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/