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]
Message-ID: <20250903170558.73054e68@kernel.org>
Date: Wed, 3 Sep 2025 17:05:58 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc: <andrew@...n.ch>, <hkallweit1@...il.com>, <linux@...linux.org.uk>,
 <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
 <richardcochran@...il.com>, <vadim.fedorenko@...ux.dev>,
 <vladimir.oltean@....com>, <viro@...iv.linux.org.uk>,
 <quentin.schulz@...tlin.com>, <atenart@...nel.org>,
 <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v3] phy: mscc: Stop taking ts_lock for tx_queue and
 use its own lock

On Tue, 2 Sep 2025 14:12:59 +0200 Horatiu Vultur wrote:
> -	len = skb_queue_len(&ptp->tx_queue);
> +	len = skb_queue_len_lockless(&ptp->tx_queue);
>  	if (len < 1)
>  		return;
>  
>  	while (len--) {
> -		skb = __skb_dequeue(&ptp->tx_queue);
> +		skb = skb_dequeue(&ptp->tx_queue);
>  		if (!skb)
>  			return;

Isn't checking len completely unnecessary? skb_dequeue() will return
null if the list is empty, which you are already handling.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ