public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Yury Polyanskiy <ypolyans@Princeton.EDU>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [IPSEC] xfrm_state locking problem in xfrm_input.c
Date: Tue, 12 May 2009 13:48:13 +1000	[thread overview]
Message-ID: <20090512034813.GA25841@gondor.apana.org.au> (raw)
In-Reply-To: <20090511184739.6e497f29@penta.localdomain>

On Mon, May 11, 2009 at 06:47:39PM -0400, Yury Polyanskiy wrote:
> xfrm_input() code uses spin_lock() where it must be using
> spin_lock_bh() instead. The corresponding code in xfrm_output.c
> correctly uses spin_lock_bh(). 
> 
> Note that if the locally generated packet is sent to a local ip,
> dev_queue_xmit() calls loopback_xmit() and the xfrm_input() will be
> called with softirqs enabled.

dev_queue_xmit always disables BH before calling the device xmit
function.  So how can this happen?

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2009-05-12  3:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 22:47 [IPSEC] xfrm_state locking problem in xfrm_input.c Yury Polyanskiy
2009-05-12  3:48 ` Herbert Xu [this message]
2009-05-12  4:05   ` Yury Polyanskiy
2009-05-12  5:07     ` David Miller
2009-05-12 13:32       ` Yury Polyanskiy

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=20090512034813.GA25841@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ypolyans@Princeton.EDU \
    /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