Commit 8bbceba
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: 6a91b84 ("net: axienet: Introduce dmaengine support")
Signed-off-by: Abin Joseph <[email protected]>
Reviewed-by: Radhey Shyam Pandey <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent d93b10e commit 8bbceba
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1171 | 1180 | | |
1172 | 1181 | | |
1173 | 1182 | | |
| |||
1180 | 1189 | | |
1181 | 1190 | | |
1182 | 1191 | | |
| 1192 | + | |
1183 | 1193 | | |
1184 | 1194 | | |
1185 | 1195 | | |
| |||
0 commit comments