From: Robert Love <rml@novell.com>
To: Roberto Jung Drebes <drebes@inf.ufrgs.br>
Cc: netfilter-devel@lists.netfilter.org, linux-kernel@vger.kernel.org
Subject: Re: GFP_ATOMIC vs GFP_KERNEL in netfilter module
Date: Thu, 02 Dec 2004 19:31:49 -0500 [thread overview]
Message-ID: <1102033909.6052.24.camel@localhost> (raw)
In-Reply-To: <92A26C52-44B7-11D9-A62F-000A957B2B6C@inf.ufrgs.br>
On Thu, 2004-12-02 at 21:12 -0200, Roberto Jung Drebes wrote:
> If I use GFP_KERNEL with the kmallocs, I get errors like
So don't use GFP_KERNEL; use GFP_ATOMIC. You cannot sleep in netfilter
hooks, since they are run in interrupt context (when the packet is
received) by the net_rx_action softirq. You can see this in your stack
trace.
> If I use GFP_ATOMIC, I don't get the error, but I think timers are not
> being called after the delay. I have a similar code for transmition,
> which works OK with GFP_KERNEL (delays messages) but with GFP_ATOMIC it
> does also not delay.
If you have problems with GFP_ATOMIC, the problem is elsewhere and not
in the fact that your allocations are atomic versus not.
First thing, though, check the return value from kmalloc for failure (dp
and tl equal NULL) to ensure that the allocation is even working!
Robert Love
next prev parent reply other threads:[~2004-12-03 0:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 23:12 GFP_ATOMIC vs GFP_KERNEL in netfilter module Roberto Jung Drebes
2004-12-03 0:31 ` Robert Love [this message]
2004-12-06 13:10 ` Roberto Jung Drebes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1102033909.6052.24.camel@localhost \
--to=rml@novell.com \
--cc=drebes@inf.ufrgs.br \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox