[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090511.220723.266123145.davem@davemloft.net>
Date: Mon, 11 May 2009 22:07:23 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ypolyans@...nceton.EDU
Cc: herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [IPSEC] xfrm_state locking problem in xfrm_input.c
From: Yury Polyanskiy <ypolyans@...nceton.EDU>
Date: Tue, 12 May 2009 00:05:16 -0400
> On Tue, 12 May 2009 13:48:13 +1000
> Herbert Xu <herbert@...dor.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists