Commit e6058674 authored by Sameeh Jubran's avatar Sameeh Jubran Committed by Stefan Bader

net: ena: fix: Free napi resources when ena_up() fails

BugLink: https://bugs.launchpad.net/bugs/1850175

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: 1738cd3e ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: default avatarArthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: default avatarSameeh Jubran <sameehj@amazon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit b287cdbd)
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKhaled Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 580424c3
......@@ -1812,6 +1812,7 @@ static int ena_up(struct ena_adapter *adapter)
err_setup_tx:
ena_free_io_irq(adapter);
err_req_irq:
ena_del_napi(adapter);
return rc;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment