]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: fix refill races during restore
authorJason Wang <jasowang@redhat.com>
Mon, 30 Dec 2013 03:34:40 +0000 (11:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2014 00:23:03 +0000 (19:23 -0500)
commita971b7fe73a738e29f8a820de2eeb9ceab91be3c
tree7950381f38ef89f1fd0de690dd2ec5bccdc8b355
parentc967b13b1bb2ad8202dbd6e30ae2701f1006097f
virtio-net: fix refill races during restore

During restoring, try_fill_recv() was called with neither napi lock nor napi
disabled. This can lead two try_fill_recv() was called in the same time. Fix
this by refilling before trying to enable napi.

Fixes 032bf76f7b913e41451c9daea857932a8bc47a0d
(virtio: net: Add freeze, restore handlers to support S4).

Cc: Amit Shah <amit.shah@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c