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: <b1fccc7c-3c9f-45e0-979f-f83dfc788613@blackwall.org>
Date: Tue, 23 Apr 2024 14:12:44 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: linke li <lilinke99@...com>
Cc: xujianhao01@...il.com, Roopa Prabhu <roopa@...dia.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 bridge@...ts.linux.dev, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: bridge: remove redundant check of f->dst

On 4/23/24 13:53, linke li wrote:
> In br_fill_forward_path(), f->dst is checked not to be NULL, then
> immediately read using READ_ONCE and checked again. The first check is
> useless, so this patch aims to remove the redundant check of f->dst.
> 
> Signed-off-by: linke li <lilinke99@...com>
> ---
>   net/bridge/br_device.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
> index 65cee0ad3c1b..ae33b30ff87c 100644
> --- a/net/bridge/br_device.c
> +++ b/net/bridge/br_device.c
> @@ -405,7 +405,7 @@ static int br_fill_forward_path(struct net_device_path_ctx *ctx,
>   	br_vlan_fill_forward_path_pvid(br, ctx, path);
>   
>   	f = br_fdb_find_rcu(br, ctx->daddr, path->bridge.vlan_id);
> -	if (!f || !f->dst)
> +	if (!f)
>   		return -1;
>   
>   	dst = READ_ONCE(f->dst);

This patch should target net-next (PATCH net-next in subject).
Other than that the patch seems fine.

Acked-by: Nikolay Aleksandrov <razor@...ckwall.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ