net: ena: fix surprise unplug NULL dereference kernel crash
authorNetanel Belgazal <netanel@amazon.com>
Sun, 9 Sep 2018 08:15:20 +0000 (08:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Sep 2018 14:59:55 +0000 (07:59 -0700)
commit772ed869f535b4ec2b134645c951ff22de4d3f79
treee526e8e2408f0903e29796653bbf2d569f5adc5b
parent5cf4a8532c992bb22a9ecd5f6d93f873f4eaccc2
net: ena: fix surprise unplug NULL dereference kernel crash

Starting with driver version 1.5.0, in case of a surprise device
unplug, there is a race caused by invoking ena_destroy_device()
from two different places. As a result, the readless register might
be accessed after it was destroyed.

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c