lock_sock and friends !

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
   From reading the Linux 2.4 networking code I can figure out that any 
activity that can change the state of the socket (it can be sequence 
numbers getting updated or geting more free sndbuf memory because of some 
packet on the retransmission queue being ACKed) is done after taking the 
socket lock (lock_sock from user context and bh_lock_sock from BH 
context).
I would like some authority on this to confirm this. Is the following 
statement true.
At any time (even on SMP machines) only one piece of the code will be 
working on a socket. Of course the piece of code in question is one that 
changes the state of the socket, either by processing a newly received 
packet or by calling tcp_free_skb() to add to the free socket memory.

If any clarification is needed pls feel free to contact me.

Any comments are highly welcome.

Thanx
tomar

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux