lkml.org 
[lkml]   [2014]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mm: slub: gpf in deactivate_slab
On Tue 25-03-14 12:06:36, Christoph Lameter wrote:
> On Tue, 25 Mar 2014, Michal Hocko wrote:
>
> > You are right. The function even does VM_BUG_ON(!irqs_disabled())...
> > Unfortunatelly we do not seem to have an _irq alternative of the bit
> > spinlock.
> > Not sure what to do about it. Christoph?
> >
> > Btw. it seems to go way back to 3.1 (1d07171c5e58e).
>
> Well there is a preempt_enable() (bit_spin_lock) and a preempt_disable()
> bit_spin_unlock() within a piece of code where irqs are disabled.
>
> Is that a problem? Has been there for a long time.

It is because preempt_enable calls __preempt_schedule when the preempt
count drops down to 0. You would need to call preempt_disable before you
disable interrupts or use an irq safe bit spin unlock which doesn't
enabled preemption unconditionally.


--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-03-25 22:01    [W:0.090 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site