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: <20110824.194344.423083561694337662.davem@davemloft.net>
Date:	Wed, 24 Aug 2011 19:43:44 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	tim.c.chen@...ux.intel.com
Cc:	eric.dumazet@...il.com, viro@...iv.linux.org.uk,
	ebiederm@...ssion.com, ak@...ux.intel.com,
	matt.fleming@...ux.intel.com, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [Patch] Scm: Remove unnecessary pid & credential references in
 Unix socket's send and receive path

From: Tim Chen <tim.c.chen@...ux.intel.com>
Date: Mon, 22 Aug 2011 17:57:26 -0700

> On Mon, 2011-08-22 at 17:40 -0700, David Miller wrote:
>> From: Tim Chen <tim.c.chen@...ux.intel.com>
>> Date: Fri, 19 Aug 2011 09:44:58 -0700
>> 
>> > -		/* Only send the fds in the first buffer */
>> > -		err = unix_scm_to_skb(siocb->scm, skb, !fds_sent);
>> > +		/* Only send the fds and no ref to pid in the first buffer */
>> > +		if (fds_sent)
>> > +			err = unix_scm_to_skb(siocb->scm, skb, !fds_sent, true);
>> > +		else
>> > +			err = unix_scm_to_skb(siocb->scm, skb, !fds_sent, false);
>> 
>> Just set this final boolean the way the third argument is, there is no
>> reason to replicate the entire function call twice just to set the
>> final argument to what "fds_sent" evaluates to as a boolean.
>> 
>> 		err = unix_scm_to_skb(siocb->scm, skb, !fds_sent, fds_sent);
>> 
>> ought to suffice.
> 
> Good point.  Patch updated as suggested.

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ