diff options
author | Pavel Sakharov <p.sakharov@ispras.ru> | 2024-02-14 12:27:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-17 21:42:27 +0300 |
commit | 97dde84026339e4b4af9a6301f825d1828d7874b (patch) | |
tree | 9a35c9ddd355945ec85ac6ed642fedf87750089b /.clang-format | |
parent | 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210 (diff) | |
download | linux-97dde84026339e4b4af9a6301f825d1828d7874b.tar.xz |
net: stmmac: Fix incorrect dereference in interrupt handlers
If 'dev' or 'data' is NULL, the 'priv' variable has an incorrect address
when dereferencing calling netdev_err().
Since we get as 'dev_id' or 'data' what was passed as the 'dev' argument
to request_irq() during interrupt initialization (that is, the net_device
and rx/tx queue pointers initialized at the time of the call) and since
there are usually no checks for the 'dev_id' argument in such handlers
in other drivers, remove these checks from the handlers in stmmac driver.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX")
Signed-off-by: Pavel Sakharov <p.sakharov@ispras.ru>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions