Re: alloc_skb called nonatomically from interrupt.. 2.1.84

David S. Miller (
Fri, 30 Jan 1998 22:36:19 -0800

Date: Sat, 31 Jan 1998 06:59:23 +0100 (MET)
From: "Michael L. Galbraith" <>

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:

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

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?

David S. Miller