netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: netdev@vger.kernel.org
Subject: Re: [IPSEC]: Don't warn if high-order hash resize fails
Date: Mon, 14 May 2007 02:17:46 -0700 (PDT)	[thread overview]
Message-ID: <20070514.021746.17866513.davem@davemloft.net> (raw)
In-Reply-To: <20070514073941.GA24722@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 14 May 2007 17:39:41 +1000

> [IPSEC]: Check validity of direction in xfrm_policy_byid
> 
> The function xfrm_policy_byid takes a dir argument but finds the policy
> using the index instead.  We only use the dir argument to update the
> policy count for that direction.  Since the user can supply any value
> for dir, this can corrupt our policy count.
> 
> I know this is the problem because a few days ago I was deleting
> policies by hand using indicies and accidentally typed in the wrong
> direction.  It still deleted the policy and at the time I thought
> that was cool.  In retrospect it isn't such a good idea :)
> 
> I decided against letting it delete the policy anyway just in case
> we ever remove the connection between indicies and direction.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Good spotting, patch applied, thanks!

      reply	other threads:[~2007-05-14  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14  5:48 [IPSEC]: Don't warn if high-order hash resize fails Herbert Xu
2007-05-14  6:36 ` David Miller
2007-05-14  7:07   ` Herbert Xu
2007-05-14  7:26     ` Herbert Xu
2007-05-14  7:27       ` Herbert Xu
2007-05-14  7:39         ` Herbert Xu
2007-05-14  9:17           ` David Miller [this message]

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=20070514.021746.17866513.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    /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).