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: <20160414211147.GA15463@jwg>
Date:	Thu, 14 Apr 2016 14:11:48 -0700
From:	Weongyo Jeong <weongyo.linux@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, willemb@...gle.com
Subject: Re: [PATCH net-next v3] packet: uses kfree_skb() for errors.

On Wed, Apr 13, 2016 at 10:56:01PM -0400, David Miller wrote:
> From: Weongyo Jeong <weongyo.linux@...il.com>
> Date: Fri,  8 Apr 2016 09:25:48 -0700
> 
> > diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
> > index 1ecfa71..4e054bb 100644
> > --- a/net/packet/af_packet.c
> > +++ b/net/packet/af_packet.c
> > @@ -2042,6 +2042,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
> >  	u8 *skb_head = skb->data;
> >  	int skb_len = skb->len;
> >  	unsigned int snaplen, res;
> > +	bool err = false;
> >  
> >  	if (skb->pkt_type == PACKET_LOOPBACK)
> >  		goto drop;
> 
> It is non-canonical to use a variable named 'err' as a boolean.
> Instead, all programmers expect a variable named 'err' to be an
> integer type and to hold an error code.
> 
> Therefore please use a more appropriate name for this variable.
> 
> Name it in a way which describes the exact important condition
> which is true or false.
> 
> Thank you.

Thank you for your opinion.  I'd fixed it to proper name and
submitted v4 patch.

Regards,
Weongyo Jeong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ