diff options
author | Sameeh Jubran <sameehj@amazon.com> | 2019-05-01 16:47:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 16:46:32 +0300 |
commit | 7799cd5d6b0efea6dbad635738b9049362810457 (patch) | |
tree | db65293c98e8bff194526ffa7bc30f242677d2a8 /drivers/net | |
parent | 44d443842c6a5c4b8a5ca3cd1748a63f13541052 (diff) | |
download | linux-7799cd5d6b0efea6dbad635738b9049362810457.tar.xz |
net: ena: fix: Free napi resources when ena_up() fails
[ Upstream commit b287cdbd1cedfc9606682c6e02b58d00ff3a33ae ]
ena_up() calls ena_init_napi() but does not call ena_del_napi() in
case of failure. This causes a segmentation fault upon rmmod when
netif_napi_del() is called. Fix this bug by calling ena_del_napi()
before returning error from ena_up().
Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index d22b138c2b09..518ff393a026 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -1796,6 +1796,7 @@ err_setup_rx: err_setup_tx: ena_free_io_irq(adapter); err_req_irq: + ena_del_napi(adapter); return rc; } |