]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Sep 2018 14:59:56 +0000 (07:59 -0700)
commit6f6d750749a5419385816fd74c9d9fcf4bba7edf
tree69520b05ade630919994b950735df930ade498c1
parent0e05327cd68508af84244235ba52b8c7c8afe3d9
net: ena: fix missing lock during device destruction

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>
drivers/net/ethernet/amazon/ena/ena_netdev.c