Files
linux/drivers/net/ethernet/qlogic/qede
Jamie Bainbridge 8928239e5e qede: confirm skb is allocated before using
[ Upstream commit 4e910dbe36 ]

qede_build_skb() assumes build_skb() always works and goes straight
to skb_reserve(). However, build_skb() can fail under memory pressure.
This results in a kernel panic because the skb to reserve is NULL.

Add a check in case build_skb() failed to allocate and return NULL.

The NULL return is handled correctly in callers to qede_build_skb().

Fixes: 8a8633978b ("qede: Add build_skb() support.")
Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 21:01:06 +02:00
..
2020-06-30 15:51:40 -07:00
2020-06-30 15:51:40 -07:00
2021-09-08 08:49:00 +02:00
2020-06-30 15:51:40 -07:00