netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Joy Latten <latten@austin.ibm.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, eparis@redhat.com,
	selinux@tycho.nsa.gov
Subject: Re: [PATCH]: Add security check before flushing SAD/SPD
Date: Mon, 26 Mar 2007 16:14:59 -0400 (EDT)	[thread overview]
Message-ID: <Line.LNX.4.64.0703261612370.14914@d.namei> (raw)
In-Reply-To: <Line.LNX.4.64.0703261600210.14555@d.namei>

On Mon, 26 Mar 2007, James Morris wrote:

> On Mon, 26 Mar 2007, Joy Latten wrote:
> 
> > Signed-off-by: Joy Latten<latten@austin.ibm.com>
> 
> This looks ok to me, although I have a couple of minor issues (which 
> should probably not stop it being merged):
> 
> > +			if ((err = security_xfrm_policy_delete(pol)) != 0) {
> 
> The value of 'err' is implicitly inverted several times in this function 
> (and similarly in the state flush one).  Something like
> 
> 	ret = (fn() != 0);

Oops, ignore the above.

The correct idiom is:

	err = fn();
	if (err) {
		/* handle error */
	}


Please use that, to reduce confusion :-)



- James
-- 
James Morris
<jmorris@namei.org>

  reply	other threads:[~2007-03-26 20:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 19:39 [PATCH]: Add security check before flushing SAD/SPD Joy Latten
2007-03-26 20:05 ` James Morris
2007-03-26 20:14   ` James Morris [this message]
2007-03-26 20:34 ` Eric Paris
  -- strict thread matches above, loose matches on Subject: below --
2007-03-26 23:21 Joy Latten
2007-03-27  3:08 ` James Morris
2007-06-04 19:05 ` Eric Paris
2007-06-04 19:44   ` James Morris
2007-06-04 23:13     ` James Morris
2007-06-04 23:55       ` David Miller
2007-06-05 17:56     ` Joy Latten
2007-03-26 22:58 Joy Latten
2007-03-22 18:35 Joy Latten
2007-03-22 19:01 ` David Miller
2007-03-22 21:23   ` Joy Latten
2007-03-22 23:49     ` James Morris
2007-03-22 23:50       ` Joy Latten
2007-03-23  0:56         ` James Morris
2007-03-23  5:39       ` Eric Paris
2007-03-23  6:22         ` David Miller
2007-03-23 16:33         ` Joy Latten
2007-03-23 16:59           ` Eric Paris
2007-03-23 18:50             ` Joy Latten
2007-03-23 18:46         ` James Morris
2007-03-23 18:47           ` David Miller
2007-03-23 18:50             ` Eric Paris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Line.LNX.4.64.0703261612370.14914@d.namei \
    --to=jmorris@namei.org \
    --cc=davem@davemloft.net \
    --cc=eparis@redhat.com \
    --cc=latten@austin.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).