summaryrefslogtreecommitdiff
path: root/net/tipc/handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/handler.c')
-rw-r--r--net/tipc/handler.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/tipc/handler.c b/net/tipc/handler.c
index 1fabf160501f..b36f0fcd9bdf 100644
--- a/net/tipc/handler.c
+++ b/net/tipc/handler.c
@@ -56,12 +56,12 @@ unsigned int tipc_k_signal(Handler routine, unsigned long argument)
{
struct queue_item *item;
- spin_lock_bh(&qitem_lock);
if (!handler_enabled) {
- spin_unlock_bh(&qitem_lock);
+ pr_err("Signal request ignored by handler\n");
return -ENOPROTOOPT;
}
+ spin_lock_bh(&qitem_lock);
item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC);
if (!item) {
pr_err("Signal queue out of memory\n");
@@ -112,14 +112,10 @@ void tipc_handler_stop(void)
struct list_head *l, *n;
struct queue_item *item;
- spin_lock_bh(&qitem_lock);
- if (!handler_enabled) {
- spin_unlock_bh(&qitem_lock);
+ if (!handler_enabled)
return;
- }
- handler_enabled = 0;
- spin_unlock_bh(&qitem_lock);
+ handler_enabled = 0;
tasklet_kill(&tipc_tasklet);
spin_lock_bh(&qitem_lock);