Skip to contentSkip to conversation

mt7601u: add missing release on skb in mt7601u_mcu_msg_send

PATCH Superseded Navid Emamdoost 3 participants 4 messages Jul 18, 2020 – Aug 2, 2020

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mt7601u: add missing release on skb in mt7601u_mcu_msg_send

In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be consumed on all execution paths. Release skb before returning if test_bit() fails.

---
 drivers/net/wireless/mediatek/mt7601u/mcu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt7601u/mcu.c +3 -1
index af55ed82b96f..1b5cc271a9e1 100644
@@ -116,8 +116,10 @@ mt7601u_mcu_msg_send(struct mt7601u_dev *dev, struct sk_buff *skb,
 	int sent, ret;
 	u8 seq = 0;
 
-	if (test_bit(MT7601U_STATE_REMOVED, &dev->state))
+	if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) {
+		consume_skb(skb);
 		return 0;
+	}
 
 	mutex_lock(&dev->mcu.mutex);
 
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Sat, 18 Jul 2020 00:26:29 -0500 Navid Emamdoost wrote:

In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be consumed on all execution paths. Release skb before returning if test_bit() fails.

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#2 lore raw
In reply to Navid Emamdoost
Quoted 6 lines · Navid Emamdoost

In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be consumed on all execution paths. Release skb before returning if test_bit() fails.

Patch applied to wireless-drivers-next.git, thanks.

880e21490be6 mt7601u: add missing release on skb in mt7601u_mcu_msg_send

Signature · 3 lines
https://patchwork.kernel.org/patch/11671657/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw
In reply to Navid Emamdoost
Quoted 6 lines · Navid Emamdoost

In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be consumed on all execution paths. Release skb before returning if test_bit() fails.

Patch applied to wireless-drivers-next.git, thanks.

880e21490be6 mt7601u: add missing release on skb in mt7601u_mcu_msg_send

Signature · 9 lines
https://patchwork.kernel.org/patch/11671657/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek