* [PATCH] bridge: need to ref count the LLC sap
@ 2006-05-23 22:10 Stephen Hemminger
2006-05-23 22:21 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2006-05-23 22:10 UTC (permalink / raw)
To: David S. Miller, Arnaldo Carvalho de Melo; +Cc: netdev
Bridge will OOPS on removal if other application has the SAP open.
The bridge SAP might be shared with other usages, so need
to do reference counting on module removal rather than explicit
close/delete.
Since packet might arrive after or during removal, need to clear
the receive function handle, so LLC only hands it to user (if any).
This should go in 2.616.stable and 2.6.17.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- br.orig/net/bridge/br.c
+++ br/net/bridge/br.c
@@ -55,7 +55,7 @@ static int __init br_init(void)
static void __exit br_deinit(void)
{
- llc_sap_close(br_stp_sap);
+ rcu_assign_pointer(br_stp_sap->rcv_func, NULL);
#ifdef CONFIG_BRIDGE_NETFILTER
br_netfilter_fini();
@@ -67,6 +67,7 @@ static void __exit br_deinit(void)
synchronize_net();
+ llc_sap_put(br_stp_sap);
br_fdb_get_hook = NULL;
br_fdb_put_hook = NULL;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bridge: need to ref count the LLC sap
2006-05-23 22:10 [PATCH] bridge: need to ref count the LLC sap Stephen Hemminger
@ 2006-05-23 22:21 ` David Miller
2006-05-24 0:36 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2006-05-23 22:21 UTC (permalink / raw)
To: shemminger; +Cc: acme, netdev
From: Stephen Hemminger <shemminger@osdl.org>
Subject: [PATCH] bridge: need to ref count the LLC sap
Date: Tue, 23 May 2006 15:10:35 -0700
> Bridge will OOPS on removal if other application has the SAP open.
> The bridge SAP might be shared with other usages, so need
> to do reference counting on module removal rather than explicit
> close/delete.
>
> Since packet might arrive after or during removal, need to clear
> the receive function handle, so LLC only hands it to user (if any).
>
> This should go in 2.616.stable and 2.6.17.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Applied, thanks a lot.
Please submit to -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bridge: need to ref count the LLC sap
2006-05-23 22:21 ` David Miller
@ 2006-05-24 0:36 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-05-24 0:36 UTC (permalink / raw)
To: David Miller; +Cc: shemminger, netdev
On 5/23/06, David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <shemminger@osdl.org>
> Subject: [PATCH] bridge: need to ref count the LLC sap
> Date: Tue, 23 May 2006 15:10:35 -0700
>
> > Bridge will OOPS on removal if other application has the SAP open.
> > The bridge SAP might be shared with other usages, so need
> > to do reference counting on module removal rather than explicit
> > close/delete.
> >
> > Since packet might arrive after or during removal, need to clear
> > the receive function handle, so LLC only hands it to user (if any).
> >
> > This should go in 2.616.stable and 2.6.17.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
>
> Applied, thanks a lot.
>
> Please submit to -stable.
Thanks Stephen for the patches, Dave for the quick merge, I'm still
out in la la work related land, hope to be back to fun work soon :-)
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-24 0:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-23 22:10 [PATCH] bridge: need to ref count the LLC sap Stephen Hemminger
2006-05-23 22:21 ` David Miller
2006-05-24 0:36 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).