]> git.baikalelectronics.ru Git - kernel.git/commit
net: aquantia: oops when shutdown on already stopped device
authorIgor Russkikh <igor.russkikh@aquantia.com>
Wed, 11 Apr 2018 12:23:25 +0000 (15:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Apr 2018 14:41:36 +0000 (10:41 -0400)
commitd2451d3f80f3fe76eb89858368646217441ca23f
tree89326f75b28fd9cbc9bae684c1fe9c22915825f4
parent7413d7a0ef957efd918ef0869faf2b15c3e4ebd6
net: aquantia: oops when shutdown on already stopped device

In case netdev is closed at the moment of pci shutdown, aq_nic_stop
gets called second time. napi_disable in that case hangs indefinitely.
In other case, if device was never opened at all, we get oops because
of null pointer access.

We should invoke aq_nic_stop conditionally, only if device is running
at the moment of shutdown.

Reported-by: David Arcari <darcari@redhat.com>
Fixes: 573a98ade360 ("net: aquantia: Implement pci shutdown callback")
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_nic.c