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:   Wed, 11 Aug 2021 09:11:05 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Harshvardhan Jha <harshvardhan.jha@...cle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 130/135] net: qede: Fix end of loop tests for
 list_for_each_entry

Hi!

> [ Upstream commit 795e3d2ea68e489ee7039ac29e98bfea0e34a96c ]
> 
> The list_for_each_entry() iterator, "vlan" in this code, can never be
> NULL so the warning will never be printed.

Could someone double-check this? Because changelog is not accurate;
condition is using logical or, so warning can be printed. I don't
really see a bug with the old code.

New code is quite confusing, and if the vlan with required vic is the
"head" one, it will do the wrong thing, no?

Best regards,
								Pavel

> +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c
> @@ -842,7 +842,7 @@ int qede_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
>  		if (vlan->vid == vid)
>  			break;
>  
> -	if (!vlan || (vlan->vid != vid)) {
> +	if (list_entry_is_head(vlan, &edev->vlan_list, list)) {
>  		DP_VERBOSE(edev, (NETIF_MSG_IFUP | NETIF_MSG_IFDOWN),
>  			   "Vlan isn't configured\n");
>  		goto out;

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ