diff options
author | David S. Miller <davem@davemloft.net> | 2013-12-18 16:42:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-18 16:42:06 -0500 |
commit | 143c9054949436cb05e468439dc5e46231f33d09 (patch) | |
tree | c2e972d8188fb1b36368e9acb5b6b59466c9d903 /net/tipc | |
parent | 0b6807034791160d5e584138943d2daea765436d (diff) | |
parent | 35eecf052250f663f07a4cded7d3503fd1b50729 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/macvtap.c
Both minor merge hassles, simple overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/core.c | 7 | ||||
-rw-r--r-- | net/tipc/handler.c | 11 |
2 files changed, 12 insertions, 6 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index 68977c423022..f9e88d8b04ca 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -109,7 +109,6 @@ err: | |||
109 | static void tipc_core_stop(void) | 109 | static void tipc_core_stop(void) |
110 | { | 110 | { |
111 | tipc_netlink_stop(); | 111 | tipc_netlink_stop(); |
112 | tipc_handler_stop(); | ||
113 | tipc_cfg_stop(); | 112 | tipc_cfg_stop(); |
114 | tipc_subscr_stop(); | 113 | tipc_subscr_stop(); |
115 | tipc_nametbl_stop(); | 114 | tipc_nametbl_stop(); |
@@ -142,9 +141,10 @@ static int tipc_core_start(void) | |||
142 | res = tipc_subscr_start(); | 141 | res = tipc_subscr_start(); |
143 | if (!res) | 142 | if (!res) |
144 | res = tipc_cfg_init(); | 143 | res = tipc_cfg_init(); |
145 | if (res) | 144 | if (res) { |
145 | tipc_handler_stop(); | ||
146 | tipc_core_stop(); | 146 | tipc_core_stop(); |
147 | 147 | } | |
148 | return res; | 148 | return res; |
149 | } | 149 | } |
150 | 150 | ||
@@ -174,6 +174,7 @@ static int __init tipc_init(void) | |||
174 | 174 | ||
175 | static void __exit tipc_exit(void) | 175 | static void __exit tipc_exit(void) |
176 | { | 176 | { |
177 | tipc_handler_stop(); | ||
177 | tipc_core_stop_net(); | 178 | tipc_core_stop_net(); |
178 | tipc_core_stop(); | 179 | tipc_core_stop(); |
179 | pr_info("Deactivated\n"); | 180 | pr_info("Deactivated\n"); |
diff --git a/net/tipc/handler.c b/net/tipc/handler.c index b36f0fcd9bdf..e4bc8a296744 100644 --- a/net/tipc/handler.c +++ b/net/tipc/handler.c | |||
@@ -56,12 +56,13 @@ unsigned int tipc_k_signal(Handler routine, unsigned long argument) | |||
56 | { | 56 | { |
57 | struct queue_item *item; | 57 | struct queue_item *item; |
58 | 58 | ||
59 | spin_lock_bh(&qitem_lock); | ||
59 | if (!handler_enabled) { | 60 | if (!handler_enabled) { |
60 | pr_err("Signal request ignored by handler\n"); | 61 | pr_err("Signal request ignored by handler\n"); |
62 | spin_unlock_bh(&qitem_lock); | ||
61 | return -ENOPROTOOPT; | 63 | return -ENOPROTOOPT; |
62 | } | 64 | } |
63 | 65 | ||
64 | spin_lock_bh(&qitem_lock); | ||
65 | item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC); | 66 | item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC); |
66 | if (!item) { | 67 | if (!item) { |
67 | pr_err("Signal queue out of memory\n"); | 68 | pr_err("Signal queue out of memory\n"); |
@@ -112,10 +113,14 @@ void tipc_handler_stop(void) | |||
112 | struct list_head *l, *n; | 113 | struct list_head *l, *n; |
113 | struct queue_item *item; | 114 | struct queue_item *item; |
114 | 115 | ||
115 | if (!handler_enabled) | 116 | spin_lock_bh(&qitem_lock); |
117 | if (!handler_enabled) { | ||
118 | spin_unlock_bh(&qitem_lock); | ||
116 | return; | 119 | return; |
117 | 120 | } | |
118 | handler_enabled = 0; | 121 | handler_enabled = 0; |
122 | spin_unlock_bh(&qitem_lock); | ||
123 | |||
119 | tasklet_kill(&tipc_tasklet); | 124 | tasklet_kill(&tipc_tasklet); |
120 | 125 | ||
121 | spin_lock_bh(&qitem_lock); | 126 | spin_lock_bh(&qitem_lock); |