Patch "batman-adv: Fix broadcast/ogm queue limit on a removed interface" has been added to the 3.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
batman-adv: Fix broadcast/ogm queue limit on a removed interface
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
batman-adv-fix-broadcast-ogm-queue-limit-on-a-removed-interface.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42fMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Linus=20L=C3=BCssing?= <[email protected]>
Date: Fri, 11 Mar 2016 14:04:49 +0100
Subject: batman-adv: Fix broadcast/ogm queue limit on a removed interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Linus Lüssing <[email protected]>
commit c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42f upstream.
When removing a single interface while a broadcast or ogm packet is still pending then we will free the forward packet without releasing the queue slots again.
This patch is supposed to fix this issue.
--- net/batman-adv/send.c | 6 ++++++ 1 file changed, 6 insertions(+)
net/batman-adv/send.c +6 -0
@@ -637,6 +637,12 @@ batadv_purge_outstanding_packets(structif (pending) {hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->bcast_queue_left); + +if (!forw_packet->own) +atomic_inc (&bat_priv->batman_queue_left); +batadv_forw_packet_free (forw_packet); } }
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/batman-adv-fix-broadcast-ogm-queue-limit-on-a-removed-interface.patch
Sven Eckelmann
maintainerOn Friday 06 May 2016 14:36:56 [email protected] wrote:
[...]
Quoted 3 lines
The filename of the patch is:
batman-adv-fix-broadcast-ogm-queue-limit-on-a-removed-interface.patch
and it can be found in the queue-3.14 subdirectory.
[...]
Quoted 6 lines
net/batman-adv/send.c +0
-0@@ -637,6 +637,12 @@ batadv_purge_outstanding_packets(structif (pending) {
net/batman-adv/send.c batadv_purge_outstanding_packets(struct · line 648
Quoted 10 lines
net/batman-adv/send.c +6
-0hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->bcast_queue_left); + +if (!forw_packet->own) +atomic_inc (&bat_priv->batman_queue_left); +batadv_forw_packet_free (forw_packet); } }
This looks odd. Why is this commit doing the inc twice in the same place? Looks different than the origin patch (which does it for two different places):
https://patchwork.open-mesh.org/patch/15974/
Same for the 4.4 and 4.5 stable changes. I've cherry-picked the commit for 3.14 and my results look like this (not even compile tested):
net/batman-adv/send.c +0 -0
@@ -610,6 +610,9 @@ batadv_purge_outstanding_packets(struct batadv_priv
*bat_priv,
if (pending) {
hlist_del(&forw_packet->list);
+ if (!forw_packet->own)
+ atomic_inc(&bat_priv->bcast_queue_left);
+
batadv_forw_packet_free(forw_packet);
}
}
@@ -637,6 +640,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
if (pending) {
hlist_del(&forw_packet->list);
+ if (!forw_packet->own)
+ atomic_inc(&bat_priv->batman_queue_left);
+
batadv_forw_packet_free(forw_packet);
}
}
Kind regards,
Sven
Greg KH
maintainerQuoted 55 lines · Sven Eckelmann
On Friday 06 May 2016 14:36:56 [email protected] wrote:
[...]Quoted 3 lines
The filename of the patch is:
batman-adv-fix-broadcast-ogm-queue-limit-on-a-removed-interface.patch
and it can be found in the queue-3.14 subdirectory.[...]
Quoted 6 lines
net/batman-adv/send.c +0
-0@@ -637,6 +637,12 @@ batadv_purge_outstanding_packets(structif (pending) {net/batman-adv/send.c batadv_purge_outstanding_packets(struct · line 648
Quoted 10 lines
net/batman-adv/send.c +6
-0hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->bcast_queue_left); + +if (!forw_packet->own) +atomic_inc (&bat_priv->batman_queue_left); +batadv_forw_packet_free (forw_packet); } }This looks odd. Why is this commit doing the inc twice in the same place? Looks different than the origin patch (which does it for two different places):
https://patchwork.open-mesh.org/patch/15974/
Same for the 4.4 and 4.5 stable changes. I've cherry-picked the commit for 3.14 and my results look like this (not even compile tested):
net/batman-adv/send.c +3
-0@@ -610,6 +610,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, if (pending) {hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->bcast_queue_left); +batadv_forw_packet_free (forw_packet); }net/batman-adv/send.c +3
-0}@@ -637,6 +640,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, if (pending) {hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->batman_queue_left); +batadv_forw_packet_free (forw_packet); }
Quoted 2 lines
}
Oh that's really odd, thanks for letting me know. Let me try to figure out what went wrong...
greg k-h
Greg KH
maintainerQuoted 49 lines · Greg KH
Quoted 48 lines · Sven Eckelmann
On Friday 06 May 2016 14:36:56 [email protected] wrote:
[...]Quoted 3 lines
The filename of the patch is:
batman-adv-fix-broadcast-ogm-queue-limit-on-a-removed-interface.patch
and it can be found in the queue-3.14 subdirectory.[...]
Quoted 6 lines
net/batman-adv/send.c +0
-0@@ -637,6 +637,12 @@ batadv_purge_outstanding_packets(structif (pending) {net/batman-adv/send.c batadv_purge_outstanding_packets(struct · line 648
Quoted 10 lines
net/batman-adv/send.c +6
-0hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->bcast_queue_left); + +if (!forw_packet->own) +atomic_inc (&bat_priv->batman_queue_left); +batadv_forw_packet_free (forw_packet); } }This looks odd. Why is this commit doing the inc twice in the same place? Looks different than the origin patch (which does it for two different places):
https://patchwork.open-mesh.org/patch/15974/
Same for the 4.4 and 4.5 stable changes. I've cherry-picked the commit for 3.14 and my results look like this (not even compile tested):
net/batman-adv/send.c +3
-0@@ -610,6 +610,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, if (pending) {hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->bcast_queue_left); +batadv_forw_packet_free (forw_packet); }net/batman-adv/send.c +0
-0}@@ -637,6 +640,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
Quoted 12 lines
Quoted 9 lines
net/batman-adv/send.c +3
-0if (pending) {hlist_del (&forw_packet->list); +if (!forw_packet->own) +atomic_inc (&bat_priv->batman_queue_left); +batadv_forw_packet_free (forw_packet); }}
Oh that's really odd, thanks for letting me know. Let me try to figure out what went wrong...
This looks like a bug in patch. Git creates the correct patch, but when patch imports it, it messes it up and creates the version you saw.
I hand edited the file after it was patched to fix this up.
If I get a chance I'll go file a bug with the patch developers.
thanks,
greg k-h