Skip to content
Commit 4e910dbe authored by Jamie Bainbridge's avatar Jamie Bainbridge Committed by David S. Miller
Browse files

qede: confirm skb is allocated before using

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: 8a863397

 ("qede: Add build_skb() support.")
Signed-off-by: default avatarJamie Bainbridge <jamie.bainbridge@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a3ebe92a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment