Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[BRIDGE]: need to ref count the LLC sap

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).

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Stephen Hemminger and committed by
David S. Miller
387e2b04 4a063739

+2 -1
+2 -1
net/bridge/br.c
··· 55 55 56 56 static void __exit br_deinit(void) 57 57 { 58 - llc_sap_close(br_stp_sap); 58 + rcu_assign_pointer(br_stp_sap->rcv_func, NULL); 59 59 60 60 #ifdef CONFIG_BRIDGE_NETFILTER 61 61 br_netfilter_fini(); ··· 67 67 68 68 synchronize_net(); 69 69 70 + llc_sap_put(br_stp_sap); 70 71 br_fdb_get_hook = NULL; 71 72 br_fdb_put_hook = NULL; 72 73