Commit d0ecda6f authored by Abin Joseph's avatar Abin Joseph Committed by Greg Kroah-Hartman
Browse files

net: xilinx: axienet: Add error handling for RX metadata pointer retrieval



[ Upstream commit 8bbceba7 ]

Add proper error checking for dmaengine_desc_get_metadata_ptr() which
can return an error pointer and lead to potential crashes or undefined
behaviour if the pointer retrieval fails.

Properly handle the error by unmapping DMA buffer, freeing the skb and
returning early to prevent further processing with invalid data.

Fixes: 6a91b846 ("net: axienet: Introduce dmaengine support")
Signed-off-by: default avatarAbin Joseph <abin.joseph@amd.com>
Reviewed-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Link: https://patch.msgid.link/20250903025213.3120181-1-abin.joseph@amd.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4a5633b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment