linux/drivers/net/ethernet/ni
Yuri Karpov 9256db4e45 net: ethernet: nixge: fix NULL dereference
In function nixge_hw_dma_bd_release() dereference of NULL pointer
priv->rx_bd_v is possible for the case of its allocation failure in
nixge_hw_dma_bd_init().

Move for() loop with priv->rx_bd_v dereference under the check for
its validity.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 492caffa8a ("net: ethernet: nixge: Add support for National Instruments XGE netdev")
Signed-off-by: Yuri Karpov <YKarpov@ispras.ru>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-11-28 11:09:51 +00:00
..
Kconfig net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" 2020-12-17 10:54:31 -08:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nixge.c net: ethernet: nixge: fix NULL dereference 2022-11-28 11:09:51 +00:00