]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: fix a race on 32bit arches
authorEric Dumazet <edumazet@google.com>
Tue, 5 Jun 2012 22:35:24 +0000 (22:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jun 2012 03:23:20 +0000 (20:23 -0700)
commit2b739281dfb510d070f9dd6028571b84950e82b3
tree5ee6d28233be328ac9f14ad0f0aa674a498b28d2
parent5c5c1ccbc331529680db40eab080fd058ef4af90
virtio-net: fix a race on 32bit arches

commit 510e41eec37 (virtio-net: per cpu 64 bit stats (v2)) added a race
on 32bit arches.

We must use separate syncp for rx and tx path as they can be run at the
same time on different cpus. Thus one sequence increment can be lost and
readers spin forever.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c