Re: Patch "batman-adv: Fix broadcast/ogm queue limit on a removed interface" has been added to the 3.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 06 May 2016 14:36:56 gregkh@xxxxxxxxxxxxxxxxxxx wrote:
[...]
> 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.
[...]
> --- a/net/batman-adv/send.c
> +++ b/net/batman-adv/send.c
> @@ -637,6 +637,12 @@ batadv_purge_outstanding_packets(struct
> 
>  		if (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);
>  		}
>  	}
> 

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):

--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -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

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]