Commit 81f63ed
net: xilinx: axienet: Add error handling for RX metadata pointer retrieval
[ Upstream commit 8bbceba ]
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: 6a91b84 ("net: axienet: Introduce dmaengine support")
Signed-off-by: Abin Joseph <abin.joseph@amd.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Link: https://patch.msgid.link/20250903025213.3120181-1-abin.joseph@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit d0ecda6fdd840b406df6617b003b036f65dd8926)1 parent 444b1df commit 81f63ed
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1130 | 1139 | | |
1131 | 1140 | | |
1132 | 1141 | | |
| |||
1139 | 1148 | | |
1140 | 1149 | | |
1141 | 1150 | | |
| 1151 | + | |
1142 | 1152 | | |
1143 | 1153 | | |
1144 | 1154 | | |
| |||
0 commit comments