From: Rusty Russell Date: Thu, 29 Dec 2011 00:42:38 +0000 (+0000) Subject: virtio_net: set/cancel work on ndo_open/ndo_stop X-Git-Tag: v3.3-rc1~182^2~80 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2baed69e605c3e57d28940cc7aaae908d61f769;p=pandora-kernel.git 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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed