lkml.org 
[lkml]   [1998]   [Jan]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 30 Jan 1998 22:36:19 -0800
From"David S. Miller" <>
SubjectRe: alloc_skb called nonatomically from interrupt.. 2.1.84
   Date: 	Sat, 31 Jan 1998 06:59:23 +0100 (MET)
   From: "Michael L. Galbraith" <mikeg@weiden.de>

   Just received the above (title) upon booting 2.1.84.  The reported
   address translated to inet6_rt_notify, and repeated 4 times.

Linus, let's decide what we want the semantics of certain things to
be.  The new definition of in_interrupt() in linux/interrupt.h (which
btw in an of itself is a no-no, it references elements of the
interrupt protection mechanism which we both agreed would be
per-architecture and therefore should not be mentioned by name in a
generic header) counts "in interrupt" as either being within a true HW
IRQ handler or within a BH, however now code which does:

net_foo()
{
	/* We run from user context, but need to protect
	 * against incoming packet handling code...
	 */
	start_bh_atomic();
	...
	/* This now doesn't work with the current code... */
	skb = alloc_skb(size, GFP_KERNEL);
	...
	end_bh_atomic();
}
won't work anymore...

A lot of pieces of code do things like this, start a BH atomic from
base level code and call something which can only legitimately run
from non-IRQ code under certain circumstances.

Is this just an oversight, or is there something else going on?

Later,
David S. Miller
davem@dm.cobaltmicro.com

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008