lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140325180149.GD7519@dhcp22.suse.cz>
Date:	Tue, 25 Mar 2014 11:01:50 -0700
From:	Michal Hocko <mhocko@...e.cz>
To:	Christoph Lameter <cl@...ux.com>
Cc:	Sasha Levin <sasha.levin@...cle.com>,
	Pekka Enberg <penberg@...nel.org>,
	Matt Mackall <mpm@...enic.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: mm: slub: gpf in deactivate_slab

On Tue 25-03-14 10:56:34, Michal Hocko wrote:
> 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.

Hmm, now that I am looking into the code more closely it seems that
preempt_schedule bails out when interrupts are disabled.
-- 
Michal Hocko
SUSE Labs
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ