diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-07 03:11:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-07 03:11:33 -0500 |
commit | e16aa207ccb61c5111525c462eeeba1f3f5fd370 (patch) | |
tree | 8a0a344fe7a3a10567075c9d63438ff6d79a1ca6 /net/ipv4/tcp_input.c | |
parent | 26db167702756d0022f8ea5f1f30cad3018cfe31 (diff) |
[NET]: Memory barrier cleanups
I believe all the below memory barriers only matter on SMP so
therefore the smp_* variant of the barrier should be used.
I'm wondering if the barrier in net/ipv4/inet_timewait_sock.c should be
dropped entirely. schedule_work's implementation currently implies a
memory barrier and I think sane semantics of schedule_work() should imply
a memory barrier, as needed so the caller shouldn't have to worry.
It's not quite obvious why the barrier in net/packet/af_packet.c is
needed; maybe it should be implied through flush_dcache_page?
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 9304034c0c47..c701f6abbfc1 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4235,7 +4235,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, | |||
4235 | * Change state from SYN-SENT only after copied_seq | 4235 | * Change state from SYN-SENT only after copied_seq |
4236 | * is initialized. */ | 4236 | * is initialized. */ |
4237 | tp->copied_seq = tp->rcv_nxt; | 4237 | tp->copied_seq = tp->rcv_nxt; |
4238 | mb(); | 4238 | smp_mb(); |
4239 | tcp_set_state(sk, TCP_ESTABLISHED); | 4239 | tcp_set_state(sk, TCP_ESTABLISHED); |
4240 | 4240 | ||
4241 | security_inet_conn_established(sk, skb); | 4241 | security_inet_conn_established(sk, skb); |
@@ -4483,7 +4483,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
4483 | case TCP_SYN_RECV: | 4483 | case TCP_SYN_RECV: |
4484 | if (acceptable) { | 4484 | if (acceptable) { |
4485 | tp->copied_seq = tp->rcv_nxt; | 4485 | tp->copied_seq = tp->rcv_nxt; |
4486 | mb(); | 4486 | smp_mb(); |
4487 | tcp_set_state(sk, TCP_ESTABLISHED); | 4487 | tcp_set_state(sk, TCP_ESTABLISHED); |
4488 | sk->sk_state_change(sk); | 4488 | sk->sk_state_change(sk); |
4489 | 4489 | ||