diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-29 00:42:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-29 16:44:29 -0500 |
commit | b2baed69e605c3e57d28940cc7aaae908d61f769 (patch) | |
tree | 47e23076688f9fae6b381143427958f661a31d97 /init | |
parent | 346f870b8a9aaf0847f7c7cffdbb447bb2f3853e (diff) | |
download | op-kernel-dev-b2baed69e605c3e57d28940cc7aaae908d61f769.zip op-kernel-dev-b2baed69e605c3e57d28940cc7aaae908d61f769.tar.gz |
virtio_net: set/cancel work on ndo_open/ndo_stop
Michael S. Tsirkin noticed that we could run the refill work after
ndo_close, which can re-enable napi - we don't disable it until
virtnet_remove. This is clearly wrong, so move the workqueue control
to ndo_open and ndo_stop (aka. virtnet_open and virtnet_close).
One subtle point: virtnet_probe() could simply fail if it couldn't
allocate a receive buffer, but that's less polite in virtnet_open() so
we schedule a refill as we do in the normal receive path if we run out
of memory.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions