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] [day] [month] [year] [list]
Date:	Tue, 12 Dec 2006 11:22:11 -0800 (PST)
From:	Christoph Lameter <clameter@....com>
To:	Paul Jackson <pj@....com>
cc:	jacliburn@...lsouth.net, akpm@...l.org,
	linux-kernel@...r.kernel.org
Subject: Re: [BUG] commit 3c517a61, slab: better fallback allocation behavior

On Tue, 12 Dec 2006, Paul Jackson wrote:

> Christoph wrote:
> > +		if (local_flags & __GFP_WAIT)
> > +			local_irq_enable();
> > +		kmem_flagcheck(cache, flags);
> >  		obj = kmem_getpages(cache, flags, -1);
> > +		if (local_flags & __GFP_WAIT)
> > +			local_irq_disable();
> 
> This seems strange to me.  I am surprised that it is ok for a routine
> that is called with irq's disabled, to enable them momentarilly.

The slab itself disables the irq. In this case the slab function is 
was called irqs enabled and we forgot to reenable interrupts before 
calling kmem_getpages().

> I'd have thought the caller of this routine, who called it with irq's
> disabled, would expect irq's to remain disabled across the entire call.

Irqs only stay disabled if GFP_ATOMIC is passed to the slab function.
-
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