net: ena: fix NULL dereference due to untimely napi initialization
authorArthur Kiyanovski <akiyano@amazon.com>
Tue, 9 Oct 2018 08:21:29 +0000 (11:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Oct 2018 17:49:49 +0000 (10:49 -0700)
commit78a55d05def95144ca5fa9a64c49b2a0636a9866
tree7bb860bc8cb7773d60144904df956a0ee59ebf4e
parentd7703ddbd7c9cb1ab7c08e1b85b314ff8cea38e9
net: ena: fix NULL dereference due to untimely napi initialization

napi poll functions should be initialized before running request_irq(),
to handle a rare condition where there is a pending interrupt, causing
the ISR to fire immediately while the poll function wasn't set yet,
causing a NULL dereference.

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c