[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1317117461.2541.16.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date:	Tue, 27 Sep 2011 11:57:41 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Bob Liu <lliubbo@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, joe@...ches.com,
	tglx@...utronix.de
Subject: Re: [PATCH] spinlock: rm duplicated preempt en/disable for bottom
 half
Le mardi 27 septembre 2011 à 17:40 +0800, Bob Liu a écrit :
> On Tue, Sep 27, 2011 at 5:13 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> > On Tue, 2011-09-27 at 15:56 +0800, Bob Liu wrote:
> >> local_bh_en/disable() has already deal with en/disable preempt, so rm the
> >> dumplicated one from spinlock_api_up/smp.h head file.
> >
> > I bet you haven't tried booting this..  you just broke stuff like:
> >
> 
> I only tried it on blackfin arch and can boot successfully
> although it's a simple single-cpu ystem.
> 
> >  spin_lock_bh(&foo);
> >  /* do crap */
> >  spin_unlock(&foo);
> >  /* do some other crap */
> >  local_bh_enable();
> >
> >
> > And yes that does happen.
> 
> Could you please give an example?  I did a simple search but no result.
> I thought the user should use spin_lock_bh()/spin_unlock_bh() in pairs.
> 
You probably can find such use in network stack.
net/ipv4/inet_hashtables.c  function  __inet_hash_connect()
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists