Trying to understand alloc_skb()
ebs at ebshome.net
Wed Apr 13 15:13:26 EST 2005
On Wed, Apr 13, 2005 at 01:50:05PM +0900, Daniel Ann wrote:
> 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.
Then do it. It should be trivial to unwind the stack and much simpler
than moving this code to process context.
> 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.
I think it's a bad idea. You are trying to workaround a problem
instead of fixing it. My experience shows that sooner or later it'll
come back and hit you anyway :).
More information about the Linuxppc-embedded