aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/signal.h1
-rw-r--r--kernel/signal.c10
2 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 7be18b5e2fb4..5dd5f02c5c5f 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -25,7 +25,6 @@
25 25
26struct sigqueue { 26struct sigqueue {
27 struct list_head list; 27 struct list_head list;
28 spinlock_t *lock;
29 int flags; 28 int flags;
30 siginfo_t info; 29 siginfo_t info;
31 struct user_struct *user; 30 struct user_struct *user;
diff --git a/kernel/signal.c b/kernel/signal.c
index 6904bbbfe116..8d6e64dfa5c6 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -277,7 +277,6 @@ static struct sigqueue *__sigqueue_alloc(struct task_struct *t, gfp_t flags,
277 } else { 277 } else {
278 INIT_LIST_HEAD(&q->list); 278 INIT_LIST_HEAD(&q->list);
279 q->flags = 0; 279 q->flags = 0;
280 q->lock = NULL;
281 q->user = get_uid(t->user); 280 q->user = get_uid(t->user);
282 } 281 }
283 return(q); 282 return(q);
@@ -1371,11 +1370,12 @@ void sigqueue_free(struct sigqueue *q)
1371 * pending queue. 1370 * pending queue.
1372 */ 1371 */
1373 if (unlikely(!list_empty(&q->list))) { 1372 if (unlikely(!list_empty(&q->list))) {
1374 read_lock(&tasklist_lock); 1373 spinlock_t *lock = &current->sighand->siglock;
1375 spin_lock_irqsave(q->lock, flags); 1374 read_lock(&tasklist_lock);
1375 spin_lock_irqsave(lock, flags);
1376 if (!list_empty(&q->list)) 1376 if (!list_empty(&q->list))
1377 list_del_init(&q->list); 1377 list_del_init(&q->list);
1378 spin_unlock_irqrestore(q->lock, flags); 1378 spin_unlock_irqrestore(lock, flags);
1379 read_unlock(&tasklist_lock); 1379 read_unlock(&tasklist_lock);
1380 } 1380 }
1381 q->flags &= ~SIGQUEUE_PREALLOC; 1381 q->flags &= ~SIGQUEUE_PREALLOC;
@@ -1414,7 +1414,6 @@ send_sigqueue(int sig, struct sigqueue *q, struct task_struct *p)
1414 goto out; 1414 goto out;
1415 } 1415 }
1416 1416
1417 q->lock = &p->sighand->siglock;
1418 list_add_tail(&q->list, &p->pending.list); 1417 list_add_tail(&q->list, &p->pending.list);
1419 sigaddset(&p->pending.signal, sig); 1418 sigaddset(&p->pending.signal, sig);
1420 if (!sigismember(&p->blocked, sig)) 1419 if (!sigismember(&p->blocked, sig))
@@ -1462,7 +1461,6 @@ send_group_sigqueue(int sig, struct sigqueue *q, struct task_struct *p)
1462 * We always use the shared queue for process-wide signals, 1461 * We always use the shared queue for process-wide signals,
1463 * to avoid several races. 1462 * to avoid several races.
1464 */ 1463 */
1465 q->lock = &p->sighand->siglock;
1466 list_add_tail(&q->list, &p->signal->shared_pending.list); 1464 list_add_tail(&q->list, &p->signal->shared_pending.list);
1467 sigaddset(&p->signal->shared_pending.signal, sig); 1465 sigaddset(&p->signal->shared_pending.signal, sig);
1468 1466