]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: Fix kernel oops introduced with commit 2d8688dbd4c9
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 20 Dec 2016 02:38:12 +0000 (20:38 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 21 Dec 2016 14:34:16 +0000 (16:34 +0200)
commit72470904403c6b5a5845a97f13abe35ab80e7c6b
tree2ba3e4c4dcf4f1d7aeaf919d21c4b7afb824cba6
parentfc29edbee7861b2b1b5a078afbfeea5c233bbe07
rtlwifi: Fix kernel oops introduced with commit 2d8688dbd4c9

With commit 2d8688dbd4c9 {"rtlwifi: Use dev_kfree_skb_irq instead of
kfree_skb"), the method used to free an skb was changed because the
kfree_skb() was inside a spinlock. What was forgotten is that kfree_skb()
guards against a NULL value for the argument. Routine dev_kfree_skb_irq()
does not, and a test is needed to prevent kernel panics.

Fixes: 2d8688dbd4c9 ("rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> # 4.9+
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/core.c