| To: | Mitchell Blank Jr <mitch@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] tiny af_packet.c cleanup |
| From: | Francois Romieu <romieu@xxxxxxxxxxxxx> |
| Date: | Sat, 13 Sep 2003 11:03:53 +0200 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20030913080252.GE94744@gaz.sfgoth.com>; from mitch@sfgoth.com on Sat, Sep 13, 2003 at 01:02:52AM -0700 |
| References: | <20030913055033.GB94744@gaz.sfgoth.com> <20030913093559.A23840@electric-eye.fr.zoreil.com> <20030913080252.GE94744@gaz.sfgoth.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.2.5.1i |
Mitchell Blank Jr <mitch@xxxxxxxxxx> :
[...]
> I thought that without the comment someone might think that the second
> "if()" wasn't needed (since we had just checked the same value against
> NULL a few lines up)
Ok, I completely missed the intent.
Actually packet_rcv() is run in a BH context and doesn't race with
SO_{ATTACH/DETACH}_FILTER from sock_setsockopt() which does the
appropriate BH locking (spin_lock_bh(&sk->sk_lock.slock) in
net/core/sock.c::sock_setsockopt and in net/core/filter.c::sk_attach_filter).
packet_rcv() doesn't race with BH either due to the bh_lock_sock (a spin_lock
in disguise) you quoted.
That being said, I don't see how such an explanation could fit in a short,
inlined comment. :o)
--
Ueimor
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: IPv6 6to4 on site-local networks., David Woodhouse |
|---|---|
| Next by Date: | Re: [e1000 2.6 10/11] TxDescriptors -> 1024 default, Robert Olsson |
| Previous by Thread: | Re: [PATCH] tiny af_packet.c cleanup, Mitchell Blank Jr |
| Next by Thread: | Re: [PATCH] tiny af_packet.c cleanup, Mitchell Blank Jr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |