Locking in net/core/netfilter.c

Peter Benie pjb1008@cam.ac.uk
Wed, 29 Sep 1999 09:51:26 +0100

Peter Benie writes ("Locking in net/core/netfilter.c"):
> Peter Benie writes ("Re: Connection tracking and filtering in TCP streams "):
> > there's a lot of concepts to get one's head around.
> I'm stuck already - I don't understand the interaction between
> nf_reinject() and the bottom half handler. Why is okfn() protected by
> local_bh_disable()?

I think I've got it now - okfn assumes that it is called with bh
disabled. When okfn is called from nf_hook_slow, bh is disabled anyway
so there is no need to call local_bh_disable again. When okfn is
called from nf_reinject, it might have been called from
nf_unregister_interest, and typically bh will not have been disabled yet.