diff options
author | Arthur Kiyanovski <akiyano@amazon.com> | 2020-02-11 18:17:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-12 04:08:31 +0300 |
commit | c207979f5ae10ed70aff1bb13f39f0736973de99 (patch) | |
tree | 5635ba5e41e1cd608c8ad4977c18bdadee3fe588 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 886d2089276e40d460731765083a741c5c762461 (diff) | |
download | linux-c207979f5ae10ed70aff1bb13f39f0736973de99.tar.xz |
net: ena: ena-com.c: prevent NULL pointer dereference
comp_ctx can be NULL in a very rare case when an admin command is executed
during the execution of ena_remove().
The bug scenario is as follows:
* ena_destroy_device() sets the comp_ctx to be NULL
* An admin command is executed before executing unregister_netdev(),
this can still happen because our device can still receive callbacks
from the netdev infrastructure such as ethtool commands.
* When attempting to access the comp_ctx, the bug occurs since it's set
to NULL
Fix:
Added a check that comp_ctx is not NULL
Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions