]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
staging: rtlwifi: rtl8822b: fix a missing check of alloc_skb
authorKangjie Lu <kjlu@umn.edu>
Sat, 22 Dec 2018 22:58:06 +0000 (16:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2019 15:08:28 +0000 (16:08 +0100)
commit0a54ea9f481f1a2ca5a171e91ddaacb75040f287
treea6d08dbb59397a94b470c57d6e863ff03c30f72b
parente4abc2488073a1e2764313feac5312622c7f04f9
staging: rtlwifi: rtl8822b: fix a missing check of alloc_skb

__netdev_alloc_skb() return NULl when it fails. skb_put() further uses
it even when the allocation fails, leading to NULL pointer dereference.
The fix inserts a check for the return value of __netdev_alloc_skb().

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/rtl8822be/fw.c