]> Gentwo Git Trees - linux/.git/commit
net: dlink: handle dma_map_single() failure properly
authorYeounsu Moon <yyyynoom@gmail.com>
Thu, 9 Oct 2025 15:57:16 +0000 (00:57 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Oct 2025 18:02:16 +0000 (19:02 +0100)
commit65946eac6d888d50ae527c4e5c237dbe5cc3a2f2
tree767605a77b00f3547b8996490944bd7ea5717087
parent3abc0e55ea1fa2250e52bc860e8f24b2b9a2093a
net: dlink: handle dma_map_single() failure properly

There is no error handling for `dma_map_single()` failures.

Add error handling by checking `dma_mapping_error()` and freeing
the `skb` using `dev_kfree_skb()` (process context) when it fails.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
Tested-on: D-Link DGE-550T Rev-A3
Suggested-by: Simon Horman <horms@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dlink/dl2k.c