Skip to content

Commit 0fe2477

Browse files
paravmellanoxsmb49
authored andcommitted
virtio-net: Maintain reverse cleanup order
BugLink: https://bugs.launchpad.net/bugs/2028408 [ Upstream commit 27369c9 ] To easily audit the code, better to keep the device stop() sequence to be mirror of the device open() sequence. Acked-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Parav Pandit <[email protected]> Signed-off-by: David S. Miller <[email protected]> Stable-dep-of: 5306623 ("virtio_net: Fix error unwinding of XDP initialization") Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 15a0651 commit 0fe2477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/virtio_net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1999,9 +1999,9 @@ static int virtnet_close(struct net_device *dev)
19991999
cancel_delayed_work_sync(&vi->refill);
20002000

20012001
for (i = 0; i < vi->max_queue_pairs; i++) {
2002+
virtnet_napi_tx_disable(&vi->sq[i].napi);
20022003
napi_disable(&vi->rq[i].napi);
20032004
xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
2004-
virtnet_napi_tx_disable(&vi->sq[i].napi);
20052005
}
20062006

20072007
return 0;

0 commit comments

Comments
 (0)