FAILED: patch "[PATCH] rtlwifi: Fix kernel oops introduced with commit e49656147359" failed to apply to 4.9-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
22b68b93ae2506bd56ee3bf232a51bc8ab955b56Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Mon, 19 Dec 2016 20:38:12 -0600
Subject: [PATCH] rtlwifi: Fix kernel oops introduced with commit e49656147359
With commit e49656147359 {"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.
drivers/net/wireless/realtek/rtlwifi/core.c +2 -1
@@ -1829,7 +1829,8 @@ bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb)spin_lock_irqsave (&rtlpriv->locks.irq_th_lock, flags); pskb =__skb_dequeue (&ring->queue); -dev_kfree_skb_irq (pskb); +if (pskb) +dev_kfree_skb_irq (pskb);/*this is wrong, fill_tx_cmddesc needs update*/ pdesc = &ring->desc[0 ];
Quoted 22 lines · <[email protected]> writes:
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
22b68b93ae2506bd56ee3bf232a51bc8ab955b56Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Mon, 19 Dec 2016 20:38:12 -0600
Subject: [PATCH] rtlwifi: Fix kernel oops introduced with commite49656147359With commit
e49656147359{"rtlwifi: Usedev_kfree_skb_irqinstead ofkfree_skb"), the method used to free an skb was changed because thekfree_skb()was inside a spinlock. What was forgotten is thatkfree_skb()guards against a NULL value for the argument. Routinedev_kfree_skb_irq()does not, and a test is needed to prevent kernel panics.
Quoted 5 lines
Fixes e49656147359 ("rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb")Signed-off-by Larry Finger <[email protected]>Cc Stable <[email protected]> # 4.9+Cc Wei Yongjun <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Larry, are you planning to port this to 4.9?
Signature · 1 line
Kalle Valo
Quoted 24 lines · Kalle Valo
Quoted 22 lines · <[email protected]> writes:
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
22b68b93ae2506bd56ee3bf232a51bc8ab955b56Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Mon, 19 Dec 2016 20:38:12 -0600
Subject: [PATCH] rtlwifi: Fix kernel oops introduced with commite49656147359With commit
e49656147359{"rtlwifi: Usedev_kfree_skb_irqinstead ofkfree_skb"), the method used to free an skb was changed because thekfree_skb()was inside a spinlock. What was forgotten is thatkfree_skb()guards against a NULL value for the argument. Routinedev_kfree_skb_irq()does not, and a test is needed to prevent kernel panics.
Quoted 7 lines
Quoted 5 lines
Fixes e49656147359 ("rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb")Signed-off-by Larry Finger <[email protected]>Cc Stable <[email protected]> # 4.9+Cc Wei Yongjun <[email protected]>Signed-off-by Kalle Valo <[email protected]>Larry, are you planning to port this to 4.9?
No. Apparently I got confused again and my use of the Cc to stable was incorrect. Commit 49656147359 was not applied until the 4.10 merge. The source of the confusion is related to when the various commits appear in the git log for mainline. The code, however, has the final word. :)
Dropping this patch in Stable is the correct option.
Larry
Quoted 31 lines · Larry Finger
Quoted 30 lines · Kalle Valo
Quoted 27 lines · <[email protected]> writes:
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
22b68b93ae2506bd56ee3bf232a51bc8ab955b56Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Mon, 19 Dec 2016 20:38:12 -0600
Subject: [PATCH] rtlwifi: Fix kernel oops introduced with commite49656147359With commit
e49656147359{"rtlwifi: Usedev_kfree_skb_irqinstead ofkfree_skb"), the method used to free an skb was changed because thekfree_skb()was inside a spinlock. What was forgotten is thatkfree_skb()guards against a NULL value for the argument. Routinedev_kfree_skb_irq()does not, and a test is needed to prevent kernel panics.Fixes e49656147359 ("rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb")Signed-off-by Larry Finger <[email protected]>Cc Stable <[email protected]> # 4.9+Cc Wei Yongjun <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Quoted 7 lines
Quoted 1 line
Larry, are you planning to port this to 4.9?
No. Apparently I got confused again and my use of the Cc to stable was incorrect. Commit 49656147359 was not applied until the 4.10 merge. The source of the confusion is related to when the various commits appear in the git log for mainline. The code, however, has the final word. :)
Ah, ok. I'm actually having similar problems and planning to come up with a some sort of web page which would show what was the first Linux release to contain the commit. (git-describe doesn't tell that and AFAIK there is no other git command to show it.) If only I had more free time :)
Signature · 1 line
Kalle Valo
Greg KH
maintainerQuoted 41 lines · Kalle Valo
Quoted 31 lines · Larry Finger
Quoted 30 lines · Kalle Valo
Quoted 27 lines · <[email protected]> writes:
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
22b68b93ae2506bd56ee3bf232a51bc8ab955b56Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Mon, 19 Dec 2016 20:38:12 -0600
Subject: [PATCH] rtlwifi: Fix kernel oops introduced with commite49656147359With commit
e49656147359{"rtlwifi: Usedev_kfree_skb_irqinstead ofkfree_skb"), the method used to free an skb was changed because thekfree_skb()was inside a spinlock. What was forgotten is thatkfree_skb()guards against a NULL value for the argument. Routinedev_kfree_skb_irq()does not, and a test is needed to prevent kernel panics.Fixes e49656147359 ("rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb")Signed-off-by Larry Finger <[email protected]>Cc Stable <[email protected]> # 4.9+Cc Wei Yongjun <[email protected]>Signed-off-by Kalle Valo <[email protected]>Quoted 7 lines
Quoted 1 line
Larry, are you planning to port this to 4.9?
No. Apparently I got confused again and my use of the Cc to stable was incorrect. Commit 49656147359 was not applied until the 4.10 merge. The source of the confusion is related to when the various commits appear in the git log for mainline. The code, however, has the final word. :)
Quoted 4 lines
Ah, ok. I'm actually having similar problems and planning to come up with a some sort of web page which would show what was the first Linux release to contain the commit. (git-describe doesn't tell that and AFAIK there is no other git command to show it.) If only I had more free time :)
git describe --contains
Quoted 8 lines · Greg KH
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Larry, are you planning to port this to 4.9?
No. Apparently I got confused again and my use of the Cc to stable was incorrect. Commit 49656147359 was not applied until the 4.10 merge. The source of the confusion is related to when the various commits appear in the git log for mainline. The code, however, has the final word. :)
Quoted 6 lines
Quoted 4 lines
Ah, ok. I'm actually having similar problems and planning to come up with a some sort of web page which would show what was the first Linux release to contain the commit. (git-describe doesn't tell that and AFAIK there is no other git command to show it.) If only I had more free time :)
git describe --contains
Wow, just what I needed. Thanks!
$ git describe --contains --match=v* 22b68b93ae25 v4.10-rc1~16^2~8^2
Signature · 1 line
Kalle Valo
Quoted 8 lines · Greg KH
Quoted 5 lines · Kalle Valo
Ah, ok. I'm actually having similar problems and planning to come up with a some sort of web page which would show what was the first Linux release to contain the commit. (git-describe doesn't tell that and AFAIK there is no other git command to show it.) If only I had more free time :)
git describe --contains
Greg,
Thanks for that info. Now, all we have to do is remember to run the command on mainline rather than our development branches.
Larry
Quoted 8 lines · Larry Finger
Quoted 7 lines · Greg KH
Quoted 5 lines · Kalle Valo
Ah, ok. I'm actually having similar problems and planning to come up with a some sort of web page which would show what was the first Linux release to contain the commit. (git-describe doesn't tell that and AFAIK there is no other git command to show it.) If only I had more free time :)
Quoted 6 lines
Quoted 1 line
git describe --contains
Greg,
Thanks for that info. Now, all we have to do is remember to run the command on mainline rather than our development branches.
I'm still planning to implement some sort of user friendly service for this, thanks to Greg the implementation just got a lot easier. I'm thinking of at least showing the first release it was included in (like in this case v4.10-rc1) but also the trees where the patch is currently. This way you and me don't need to remember anything, except the url where to find it :)
Signature · 1 line
Kalle Valo