summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorJamie Bainbridge <jamie.bainbridge@gmail.com>2022-04-06 21:19:19 +1000
committerDavid S. Miller <davem@davemloft.net>2022-04-06 15:16:23 +0100
commit4e910dbe36508654a896d5735b318c0b88172570 (patch)
tree2b6b7184811726861e546c8be7ee6f136ff6ac07 /include
parenta3ebe92a0f2dfaeac257b685531decf8c9cd8eee (diff)
downloadlinux-4e910dbe36508654a896d5735b318c0b88172570.tar.gz
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: 8a8633978b842 ("qede: Add build_skb() support.")
Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions