Re: [PATCH net v3 2/2] net: dlink: handle copy_thresh allocation failure

From: Andrew Lunn
Date: Tue Sep 16 2025 - 15:37:00 EST


On Wed, Sep 17, 2025 at 03:33:05AM +0900, Yeounsu Moon wrote:
> The driver did not handle failure of `netdev_alloc_skb_ip_align()`.
> If the allocation failed, dereferencing `skb->protocol` could lead to a
> NULL pointer dereference.
>
> This patch adds proper error handling by falling back to the `else` clause
> when the allocation fails.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Tested-on: D-Link DGE-550T Rev-A3
> Signed-off-by: Yeounsu Moon <yyyynoom@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew