]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: ena: fix missing lock during device destruction
authorNetanel Belgazal <netanel@amazon.com>
Sun, 9 Sep 2018 08:15:24 +0000 (08:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:56:02 +0000 (08:56 +0200)
commit968759747e95d8b2c3716cbff7897ff431d13c83
treefd4db051f62ead0c4c84738216da0580010093d6
parentcfa70f3c46f1120c546c7e4feaf56f4615292ebf
net: ena: fix missing lock during device destruction

[ Upstream commit 944b28aa2982b4590d4d4dfc777cf85135dca2c0 ]

acquire the rtnl_lock during device destruction to avoid
using partially destroyed device.

ena_remove() shares almost the same logic as ena_destroy_device(),
so use ena_destroy_device() and avoid duplications.

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c