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: <20101029205915.GC6130@lenovo>
Date:	Sat, 30 Oct 2010 00:59:15 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>, mingo@...hat.com,
	hpa@...or.com, linux-kernel@...r.kernel.org, brgerst@...il.com,
	tglx@...utronix.de, mingo@...e.hu,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] x86-32: Restore irq stacks NUMA-aware
	allocations

On Fri, Oct 29, 2010 at 10:53:07PM +0200, Eric Dumazet wrote:
> Le samedi 30 octobre 2010 à 00:28 +0400, Cyrill Gorcunov a écrit :
> > On Fri, Oct 29, 2010 at 08:32:26PM +0200, Peter Zijlstra wrote:
> > > On Fri, 2010-10-29 at 06:43 +0000, tip-bot for Eric Dumazet wrote:
> > > > +       irqctx = page_address(alloc_pages_node(cpu_to_node(cpu),
> > > > +                                              THREAD_FLAGS,
> > > > +                                              THREAD_ORDER)); 
> > > 
> > > Shouldn't we be checking for a NULL return from alloc_pages_node()
> > > before calling page_address() on it?
> > > --
> > 
> 
> I didnt check for NULL because original code was not either.
> 
> If you cannot allocate memory for the IRQ stack, only choice is to crash
> anyway.
> 
> Adding BUG_ON() is not that helpful in this respect.
> 

 I believe it was a nit in first place, so the BUG_ON simply tells to code
readers that we knew the NULL can happen here but there is simply no way
to continue then.

 Cyrill
--
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