Commit 8bbceba7 authored by Abin Joseph's avatar Abin Joseph Committed by Jakub Kicinski
Browse files

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



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>
parent d93b10e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment