public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ypolyans@Princeton.EDU
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org
Subject: Re: [IPSEC] xfrm_state locking problem in xfrm_input.c
Date: Mon, 11 May 2009 22:07:23 -0700 (PDT)	[thread overview]
Message-ID: <20090511.220723.266123145.davem@davemloft.net> (raw)
In-Reply-To: <20090512000516.32589e1f@penta.localdomain>

From: Yury Polyanskiy <ypolyans@Princeton.EDU>
Date: Tue, 12 May 2009 00:05:16 -0400

> On Tue, 12 May 2009 13:48:13 +1000
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
> 
>> 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?
>> 
> 
> Oops, you right. Thanks for the explanation!

So you didn't actually hit a bug that led you to write that
patch?

Please state this explicitly next time, and tell us that you are
"fixing" something based purely upon code inspection rather than
hitting a bug yourself.

  reply	other threads:[~2009-05-12  5:07 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
2009-05-12  4:05   ` Yury Polyanskiy
2009-05-12  5:07     ` David Miller [this message]
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=20090511.220723.266123145.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --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