diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-24 18:43:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-24 18:43:21 +0100 |
commit | 5bd2010fbe027b224db2e74a4fdfec9a7b7918d2 (patch) | |
tree | 59106aae3930a3608409c101ec32d68742c8d168 /net/tipc/handler.c | |
parent | drivers: base: Add prototype declaration to the header file (diff) | |
parent | Linux 3.13-rc5 (diff) | |
download | linux-5bd2010fbe027b224db2e74a4fdfec9a7b7918d2.tar.xz linux-5bd2010fbe027b224db2e74a4fdfec9a7b7918d2.zip |
Merge 3.13-rc5 into staging-next
We want these fixes here to handle some merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/handler.c')
-rw-r--r-- | net/tipc/handler.c | 11 |
1 files changed, 8 insertions, 3 deletions
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) { struct queue_item *item; + spin_lock_bh(&qitem_lock); if (!handler_enabled) { pr_err("Signal request ignored by handler\n"); + spin_unlock_bh(&qitem_lock); 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,10 +113,14 @@ void tipc_handler_stop(void) struct list_head *l, *n; struct queue_item *item; - if (!handler_enabled) + spin_lock_bh(&qitem_lock); + if (!handler_enabled) { + spin_unlock_bh(&qitem_lock); return; - + } handler_enabled = 0; + spin_unlock_bh(&qitem_lock); + tasklet_kill(&tipc_tasklet); spin_lock_bh(&qitem_lock); |