From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Morris Subject: Re: [IPSEC]: searching SAD without assumming L3 details Date: Sat, 2 Sep 2006 15:24:38 -0400 (EDT) Message-ID: References: <1157204582.5197.4.camel@jzny2> <1157217413.5077.17.camel@jzny2> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: "David S. Miller" , netdev@vger.kernel.org, herbert@gondor.apana.org.au Return-path: Received: from mail8.sea5.speakeasy.net ([69.17.117.10]:18886 "EHLO mail8.sea5.speakeasy.net") by vger.kernel.org with ESMTP id S1751426AbWIBTYk (ORCPT ); Sat, 2 Sep 2006 15:24:40 -0400 To: jamal In-Reply-To: <1157217413.5077.17.camel@jzny2> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Sat, 2 Sep 2006, jamal wrote: > On Sat, 2006-02-09 at 11:04 -0400, James Morris wrote: > > On Sat, 2 Sep 2006, jamal wrote: > > > + > > + spin_lock(&xfrm_state_lock); > > > > Shouldn't this be spin_lock_bh()? > > > > + spin_unlock(&xfrm_state_lock); > > + > > the call is made at the moment only by pktgen (kernel threads on > dev_queue_xmit level contending with softirqs essentially). I think > (although havent tried) the spin_{un}lock_bh() wont work. Thoughts? If bh's are already disabled when you call this, it'll be ok, but as this will be a generally exported function, I'd suggest using bh locking. I guess you could also make a xfrm_stateonly_find_bh() to be called only with bh's disabled, if needed. - James -- James Morris -- VGER BF report: U 0.523211