From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2] netfilter: ebtables: make broute table work again
Date: Mon, 10 Jan 2011 20:51:51 +0100 [thread overview]
Message-ID: <4D2B6357.4080103@netfilter.org> (raw)
In-Reply-To: <1294676914.3491.10.camel@edumazet-laptop>
On 10/01/11 17:28, Eric Dumazet wrote:
> Le lundi 10 janvier 2011 à 17:20 +0100, Florian Westphal a écrit :
>> broute table init hook sets up the "br_should_route_hook" pointer,
>> which then gets called from br_input.
>>
>> commit a386f99025f13b32502fe5dedf223c20d7283826
>> (bridge: add proper RCU annotation to should_route_hook)
>> introduced a typedef, and then changed this to:
>>
>> br_should_route_hook_t *rhook;
>> [..]
>> rhook = rcu_dereference(br_should_route_hook);
>> if (*rhook(skb))
>>
>> problem is that "br_should_route_hook" contains the address of the function,
>> so calling *rhook() results in kernel panic.
>>
>> Cc: Eric Dumazet <eric.dumazet@gmail.com>
>> Signed-off-by: Florian Westphal <fw@strlen.de>
>> ---
>> include/linux/if_bridge.h | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
>> index f7e73c3..dd3f201 100644
>> --- a/include/linux/if_bridge.h
>> +++ b/include/linux/if_bridge.h
>> @@ -103,7 +103,7 @@ struct __fdb_entry {
>>
>> extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
>>
>> -typedef int (*br_should_route_hook_t)(struct sk_buff *skb);
>> +typedef int br_should_route_hook_t(struct sk_buff *skb);
>> extern br_should_route_hook_t __rcu *br_should_route_hook;
>>
>> #endif
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks guys!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-01-10 19:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 16:20 [PATCH v2] netfilter: ebtables: make broute table work again Florian Westphal
2011-01-10 16:28 ` Eric Dumazet
2011-01-10 19:51 ` Pablo Neira Ayuso [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=4D2B6357.4080103@netfilter.org \
--to=pablo@netfilter.org \
--cc=eric.dumazet@gmail.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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.