Files
linux/drivers
Pavel Sakharov 8e29f988ad net: stmmac: Fix incorrect dereference in interrupt handlers
[ Upstream commit 97dde84026339e4b4af9a6301f825d1828d7874b ]

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: 8532f613bc ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:26:36 +01:00
..
2023-09-13 09:42:56 +02:00
2024-02-23 09:12:48 +01:00
2024-03-01 13:26:36 +01:00
2023-11-20 11:52:05 +01:00
2024-01-31 16:16:58 -08:00
2024-01-20 11:50:09 +01:00
2024-02-05 20:12:47 +00:00
2024-01-20 11:50:10 +01:00