diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-07 09:11:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-07 09:11:33 +0100 |
commit | e16aa207ccb61c5111525c462eeeba1f3f5fd370 (patch) | |
tree | 8a0a344fe7a3a10567075c9d63438ff6d79a1ca6 /net/packet | |
parent | [IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries. (diff) | |
download | linux-e16aa207ccb61c5111525c462eeeba1f3f5fd370.tar.xz linux-e16aa207ccb61c5111525c462eeeba1f3f5fd370.zip |
[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/packet')
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 08e68b67bbf6..da73e8a8c18d 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -660,7 +660,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe sll->sll_ifindex = dev->ifindex; h->tp_status = status; - mb(); + smp_mb(); { struct page *p_start, *p_end; |