diff options
author | Sameeh Jubran <sameehj@amazon.com> | 2019-05-01 16:47:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-04 00:14:46 -0400 |
commit | b287cdbd1cedfc9606682c6e02b58d00ff3a33ae (patch) | |
tree | ddc859f94e645405f075a44db773fcb32bf6eff7 /drivers/net/ethernet/amazon/ena | |
parent | 8ee8ee7fe87bf64738ab4e31be036a7165608b27 (diff) | |
download | linux-b287cdbd1cedfc9606682c6e02b58d00ff3a33ae.tar.bz2 |
net: ena: fix: Free napi resources when ena_up() fails
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>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena')
-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 dbcd58ebd0a9..03244155f74c 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -1825,6 +1825,7 @@ err_setup_rx: err_setup_tx: ena_free_io_irq(adapter); err_req_irq: + ena_del_napi(adapter); return rc; } |