From: Harald Welte <laforge@netfilter.org>
To: Ned Ren <nedren@yahoo.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Newbie Question: Locking in Netfilter hook module?
Date: Mon, 14 Jul 2003 09:47:24 +0200 [thread overview]
Message-ID: <20030714074724.GC6538@naboo> (raw)
In-Reply-To: <20030711085849.10325.qmail@web10902.mail.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
On Fri, Jul 11, 2003 at 01:58:49AM -0700, Ned Ren wrote:
> Hi,
>
> This maybe a silly question. I'm wondering for hook modules that I
> write for netfilter, is it necessary to do locking (critical section)
> when accessing my own global structures?
Yes, it is always necessarry to lock your global structures. All of
netfilter is running in softirq context.
> This is regarding SINGLE CPU systems, is there anything that would
> preempt my module while it's at it such as interrupt etc?
hard interrupts can always interrupt a softirq - but a softirq doesn't
interrupt another softirq (on single cpu).
However, all kernel code _has_ to be SMP safe.
> Thank you!
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2003-07-14 7:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-11 8:58 Newbie Question: Locking in Netfilter hook module? Ned Ren
2003-07-14 7:47 ` Harald Welte [this message]
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=20030714074724.GC6538@naboo \
--to=laforge@netfilter.org \
--cc=nedren@yahoo.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.