lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 05 Dec 2014 05:24:41 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	roy.qing.li@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH][net-next] net: avoid to call skb_queue_len again

On Fri, 2014-12-05 at 17:49 +0800, roy.qing.li@...il.com wrote:
> From: Li RongQing <roy.qing.li@...il.com>
> 
> the queue length of sd->input_pkt_queue has been putted into qlen,
> and impossible to change, since hold the lock
> 
> Signed-off-by: Li RongQing <roy.qing.li@...il.com>
> ---
>  net/core/dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 0814a56..b954400 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3297,7 +3297,7 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu,
>  	rps_lock(sd);
>  	qlen = skb_queue_len(&sd->input_pkt_queue);
>  	if (qlen <= netdev_max_backlog && !skb_flow_limit(skb, qlen)) {
> -		if (skb_queue_len(&sd->input_pkt_queue)) {
> +		if (qlen) {
>  enqueue:
>  			__skb_queue_tail(&sd->input_pkt_queue, skb);
>  			input_queue_tail_incr_save(sd, qtail);

Acked-by: Eric Dumazet <edumazet@...gle.com>

Thanks !


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ