Subject: Re: [NET]: Handle disabled preemption in gfp_any()

From: "Paul E. McKenney" <[email-masked]>
Date: Tue, 27 Feb 2007 17:25:11 -0800

On Tue, Feb 27, 2007 at 09:56:57AM -0800, David Miller wrote:
> From: Patrick McHardy <[email-masked]>
> Date: Tue, 27 Feb 2007 18:48:19 +0100
> 
> > [NET]: Handle disabled preemption in gfp_any()
> > 
> > ctnetlink uses netlink_unicast from an atomic_notifier_chain
> > (which is called within a RCU read side critical section)
> > without holding further locks. netlink_unicast calls netlink_trim
> > with the result of gfp_any() for the gfp flags, which are passed
> > down to pskb_expand_header. gfp_any() only checks for softirq
> > context and returns GFP_KERNEL, resulting in this warning:
> > 
> > BUG: sleeping function called from invalid context at mm/slab.c:3032
> > in_atomic():1, irqs_disabled():0
> > no locks held by rmmod/7010.
> 
> Applied, good catch Patrick.

Breaks -rt, but I will submit a patch to Ingo to that will make this
fix work in the -rt context.  I nevertheless agree that this is a good
catch!!!

						Thanx, Paul