patch-2.1.119 linux/net/ipv4/tcp_ipv4.c
Next file: linux/net/ipv4/tcp_timer.c
Previous file: linux/net/ipv4/tcp.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Wed Aug 26 15:52:37 1998
- Orig file:
v2.1.118/linux/net/ipv4/tcp_ipv4.c
- Orig date:
Mon Aug 3 12:45:48 1998
diff -u --recursive --new-file v2.1.118/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
@@ -720,7 +720,7 @@
* dropped. This is the new "fast" path mtu
* discovery.
*/
- if (!sk->sock_readers) {
+ if (!atomic_read(&sk->sock_readers)) {
lock_sock(sk);
tcp_simple_retransmit(sk);
release_sock(sk);
@@ -813,7 +813,7 @@
/* Prevent race conditions with accept() -
* ICMP is unreliable.
*/
- if (sk->sock_readers) {
+ if (atomic_read(&sk->sock_readers)) {
/* XXX: add a counter here to profile this.
* If too many ICMPs get dropped on busy
* servers this needs to be solved differently.
@@ -1175,7 +1175,7 @@
/* Clone the TCP header template */
newsk->dport = req->rmt_port;
- newsk->sock_readers = 0;
+ atomic_set(&newsk->sock_readers, 0);
atomic_set(&newsk->rmem_alloc, 0);
skb_queue_head_init(&newsk->receive_queue);
atomic_set(&newsk->wmem_alloc, 0);
@@ -1543,7 +1543,7 @@
if (sk->state == TCP_TIME_WAIT)
goto do_time_wait;
- if (!sk->sock_readers)
+ if (!atomic_read(&sk->sock_readers))
return tcp_v4_do_rcv(sk, skb);
__skb_queue_tail(&sk->back_log, skb);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov