]> www.infradead.org Git - users/dwmw2/linux.git/commit
ps3/gelic: Fix SKB allocation
authorGeoff Levand <geoff@infradead.org>
Wed, 21 Feb 2024 02:27:29 +0000 (11:27 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Feb 2024 11:59:30 +0000 (11:59 +0000)
commitb0b1210bc150fbd741b4b9fce8a24541306b40fc
tree3e50f91e747af749915542ddbb43a39f06ca8f1c
parent734f06db599f66d6a159c78abfdbadfea3b7d43b
ps3/gelic: Fix SKB allocation

Commit 3ce4f9c3fbb3 ("net/ps3_gelic_net: Add gelic_descr structures") of
6.8-rc1 had a copy-and-paste error where the pointer that holds the
allocated SKB (struct gelic_descr.skb)  was set to NULL after the SKB was
allocated. This resulted in a kernel panic when the SKB pointer was
accessed.

This fix moves the initialization of the gelic_descr to before the SKB
is allocated.

Reported-by: sambat goson <sombat3960@gmail.com>
Fixes: 3ce4f9c3fbb3 ("net/ps3_gelic_net: Add gelic_descr structures")
Signed-off-by: Geoff Levand <geoff@infradead.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/toshiba/ps3_gelic_net.c