Skip to content
Commit 80e82f7b authored by Yuri Karpov's avatar Yuri Karpov Committed by Greg Kroah-Hartman
Browse files

net: ethernet: nixge: fix NULL dereference

[ Upstream commit 9256db4e ]

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: 492caffa

 ("net: ethernet: nixge: Add support for National Instruments XGE netdev")
Signed-off-by: default avatarYuri Karpov <YKarpov@ispras.ru>
Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent aa08323f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment