Trying to understand alloc_skb()

Daniel Ann ktdann at gmail.com
Wed Apr 13 14:50:05 EST 2005


On 4/13/05, Eugene Surovegin <ebs at ebshome.net> wrote:
> You don't need any locks, just pass correct gfp_mask parameter to
> alloc_skb when it's called from IRQ context, e.g. GFP_ATOMIC.

Thing is, I'm not actually calling alloc_skb directly from my
function. I'm calling notifier_call_chain() and somehow inadvertently
it is getting called. If I was to give GFP_ATOMIC, then I'd have to
first find the code that is responsible.

Reading what John said earlier, rather than trying to find the code
that is calling alloc_skb, I should be moving the calls to my
fnuctions into process context.

So.. I'm gonna go ahead with John's suggestion.. but only problem now
is how do I move it to process context :P (May be more importantly,
how do I know that the code needs to be in process context or not?
which will prevent further headaches and possible coding a time bomb
:) )

-- 
Daniel



More information about the Linuxppc-embedded mailing list