]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netfront: properly destroy queues when removing device
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 27 May 2015 14:46:10 +0000 (15:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2015 18:02:28 +0000 (14:02 -0400)
commit4e94fd222a23de14e73040d3136ede73cfa9d3c1
treef2519cc3625d8d327a5e4eb8e7ca15ed4fd83274
parent58429e111a086796a5a890e967aa865256bef188
xen-netfront: properly destroy queues when removing device

xennet_remove() freed the queues before freeing the netdevice which
results in a use-after-free when free_netdev() tries to delete the
napi instances that have already been freed.

Fix this by fully destroy the queues (which includes deleting the napi
instances) before freeing the netdevice.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netfront.c