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] [day] [month] [year] [list]
Message-ID: <47A1D5FF.2020609@trash.net>
Date:	Thu, 31 Jan 2008 15:06:55 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Benjamin Li <ben@...li.org>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH] [VLAN] vlan_dev: Initialize dev pointer only when it
 is being used

Benjamin Li wrote:
> Signed-off-by: Benjamin Li <ben@...li.org>
> ---
>  net/8021q/vlan_dev.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 8059fa4..2fa5d68 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -49,7 +49,7 @@
>   */
>  static int vlan_dev_rebuild_header(struct sk_buff *skb)
>  {
> -	struct net_device *dev = skb->dev;
> +	struct net_device *dev;
>  	struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
>  
>  	switch (veth->h_vlan_encapsulated_proto) {
> @@ -60,6 +60,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
>  		return arp_find(veth->h_dest, skb);
>  #endif
>  	default:
> +		dev = skb->dev;
>  		pr_debug("%s: unable to resolve type %X addresses.\n",
>  			 dev->name, ntohs(veth->h_vlan_encapsulated_proto));


This seems pretty pointless to me.
--
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