Re: [PATCH net v2] net: dlink: handle dma_map_single() failure properly

From: Yeounsu Moon

Date: Fri Oct 10 2025 - 12:09:39 EST


On Fri Oct 10, 2025 at 3:55 PM KST, Simon Horman wrote:
> On Fri, Oct 10, 2025 at 12:57:16AM +0900, Yeounsu Moon wrote:
>> 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@xxxxxxxxx>
>> Tested-on: D-Link DGE-550T Rev-A3
>> Suggested-by: Simon Horman <horms@xxxxxxxxxx>
>
> FWIIW, I don't think my Suggested-by tag is strictly necessary here. I did
> suggest an implementation approach. And I'm very happy that you took my
> idea on board. But I'd view as more of a tweak in this case. Because the
> overall meaning of the patch remains the same as your original version.
>
Thank you for letting me know,
>> ---
>> Changelog:
>> v2:
>> - fix one thing properly
>> - use goto statement, per Simon's suggestion
>> v1: https://lore.kernel.org/netdev/20251002152638.1165-1-yyyynoom@xxxxxxxxx/
>
> Thanks for the update, this version looks good to me.
>
> Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
And I really appreciate your review.