mirror-linux/drivers/net/ethernet/dlink
Yeounsu Moon 8169a6011c net: dlink: handle copy_thresh allocation failure
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 tries to allocate `skb`. If the allocation fails, it falls
back to the normal path.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Tested-on: D-Link DGE-550T Rev-A3
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250928190124.1156-1-yyyynoom@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-29 18:47:49 -07:00
..
Kconfig Revert "eth: remove the DLink/Sundance (ST201) driver" 2025-09-02 15:49:41 -07:00
Makefile Revert "eth: remove the DLink/Sundance (ST201) driver" 2025-09-02 15:49:41 -07:00
dl2k.c net: dlink: handle copy_thresh allocation failure 2025-09-29 18:47:49 -07:00
dl2k.h net: dlink: enable RMON MMIO access on supported devices 2025-06-10 17:47:13 -07:00
sundance.c eth: sundance: fix endian issues 2025-09-02 15:49:41 -07:00