OSDN Git Service

net: ena: fix potential double ena_destroy_device()
authorNetanel Belgazal <netanel@amazon.com>
Sun, 9 Sep 2018 08:15:23 +0000 (08:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:56:02 +0000 (08:56 +0200)
commitcfa70f3c46f1120c546c7e4feaf56f4615292ebf
treee776a07e14b1042e44b871ccdafb32b937e1bd10
parent023ae1b4c0253e97c2e036c1de700749b2382481
net: ena: fix potential double ena_destroy_device()

[ Upstream commit fe870c77efdf8682252545cbd3d29800d8379efc ]

ena_destroy_device() can potentially be called twice.
To avoid this, check that the device is running and
only then proceed destroying it.

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