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: <20080101.212026.187527188.davem@davemloft.net>
Date:	Tue, 01 Jan 2008 21:20:26 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	ramirose@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-2.6.25] [BRIDGE] Remove useless code in
 net/bridge/br_netfilter.c

From: "Rami Rosen" <ramirose@...il.com>
Date: Tue, 1 Jan 2008 12:48:14 +0200

> These following two commands in br_nf_forward_arp() achieve nothing and
> should be removed; the d variable is not used later in this method:
> 
> 	...
> 	struct net_device **d = (struct net_device **)(skb->cb);
> 	...
> 	*d = (struct net_device *)in;
> 	...
> 
> Signed-off-by: Rami Rosen <ramirose@...il.com>

It's a pointer dereference assignment, this last line has a
side effect, therefore you can't remove it.

The code is equivalent to:

struct skb_bridge_info {
	struct net_device *dev;
};

	struct skb_bridge_info *d;

	d = (struct skb_bridge_info *) skb->cb;

	d->dev = in;

What automated tool showed this as useless to you?

Please correct it's logic so it doesn't mark real side effects like
this as superfluous.

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