Commit a802e299 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: More synchronize_net call sites.

parent 3c37a0b9
......@@ -24,7 +24,6 @@
#include <linux/skbuff.h>
#include <linux/proc_fs.h>
#include <linux/vmalloc.h>
#include <linux/brlock.h>
#include <net/checksum.h>
#include <linux/stddef.h>
#include <linux/sysctl.h>
......@@ -1160,8 +1159,7 @@ void ip_conntrack_helper_unregister(struct ip_conntrack_helper *me)
WRITE_UNLOCK(&ip_conntrack_lock);
/* Someone could be still looking at the helper in a bh. */
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
}
/* Refresh conntrack for this many jiffies. */
......@@ -1401,8 +1399,7 @@ void ip_conntrack_cleanup(void)
/* This makes sure all current packets have passed through
netfilter framework. Roll on, two-stage module
delete... */
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
i_see_dead_people:
ip_ct_selective_cleanup(kill_all, NULL);
......
......@@ -15,7 +15,6 @@
#include <linux/skbuff.h>
#include <linux/proc_fs.h>
#include <linux/version.h>
#include <linux/brlock.h>
#include <net/checksum.h>
#define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_conntrack_lock)
......@@ -342,8 +341,7 @@ void ip_conntrack_protocol_unregister(struct ip_conntrack_protocol *proto)
WRITE_UNLOCK(&ip_conntrack_lock);
/* Somebody could be still looking at the proto in bh. */
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
/* Remove all contrack entries for this protocol */
ip_ct_selective_cleanup(kill_proto, &proto->proto);
......
......@@ -20,7 +20,6 @@
#include <linux/timer.h>
#include <linux/skbuff.h>
#include <linux/netfilter_ipv4.h>
#include <linux/brlock.h>
#include <net/checksum.h>
#include <net/icmp.h>
#include <net/ip.h>
......@@ -545,8 +544,7 @@ void ip_nat_helper_unregister(struct ip_nat_helper *me)
WRITE_UNLOCK(&ip_nat_lock);
/* Someone could be still looking at the helper in a bh. */
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
/* Find anything using it, and umm, kill them. We can't turn
them into normal connections: if we've adjusted SYNs, then
......
......@@ -50,7 +50,6 @@
#include <linux/netfilter_ipv4.h>
#include <linux/netfilter_ipv4/ip_nat.h>
#include <linux/netfilter_ipv4/ip_nat_helper.h>
#include <linux/brlock.h>
#include <linux/types.h>
#include <linux/ip.h>
#include <net/udp.h>
......@@ -1351,8 +1350,7 @@ static void __exit fini(void)
{
ip_nat_helper_unregister(&snmp);
ip_nat_helper_unregister(&snmp_trap);
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
}
module_init(init);
......
......@@ -24,7 +24,6 @@
#include <net/checksum.h>
#include <linux/spinlock.h>
#include <linux/version.h>
#include <linux/brlock.h>
#define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_nat_lock)
#define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_nat_lock)
......@@ -286,8 +285,7 @@ void ip_nat_protocol_unregister(struct ip_nat_protocol *proto)
WRITE_UNLOCK(&ip_nat_lock);
/* Someone could be still looking at the proto in a bh. */
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
}
static int init_or_cleanup(int init)
......
......@@ -23,7 +23,6 @@
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netlink.h>
#include <linux/spinlock.h>
#include <linux/brlock.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/security.h>
......@@ -679,8 +678,7 @@ init_or_cleanup(int init)
cleanup:
nf_unregister_queue_handler(PF_INET);
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
synchronize_net();
ipq_flush(NF_DROP);
cleanup_sysctl:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment