Message ID | 1366236516-14512-1-git-send-email-linus.luessing@web.de |
---|---|
State | Superseded, archived |
Delegated to: | Marek Lindner |
Headers | show |
On Thursday 18 April 2013 00:08:36 Linus Lüssing wrote: > 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. > > Signed-off-by: Linus Lüssing <linus.luessing@web.de> > --- You are talking a batman-adv interface when it contains multiple slave interfaces, right? So batadv_purge_outstanding_packets would be called in batadv_hardif_disable_interface and not in batadv_mesh_free (which is only done when the batX interface will be removed). This at least sounds legit and I cannot find where else this imbalance would be fixed. Acked-by: Sven Eckelmann <sven@narfation.org> Kind regards, Sven PS: This patch only requires the path change from / to /net/batman-adv/ to apply via git-am
diff --git a/send.c b/send.c index ed7072a..2d539d6 100644 --- a/send.c +++ b/send.c @@ -356,6 +356,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); } } @@ -382,6 +385,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); } }
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. Signed-off-by: Linus Lüssing <linus.luessing@web.de> --- send.c | 6 ++++++ 1 file changed, 6 insertions(+) * v2: Fix summary line of commit message: This issue can happen for both OGMs and broadcast packets.