diff --git a/kernel/signal.c b/kernel/signal.c index 4754985a8..f81f7f19d 100755 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1847,11 +1847,10 @@ struct sigqueue *sigqueue_alloc(void) void sigqueue_free(struct sigqueue *q) { - spinlock_t *lock = ¤t->sighand->siglock; unsigned long flags; + spinlock_t *lock = ¤t->sighand->siglock; - if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC))) - return; + BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); /* * We must hold ->siglock while testing q->list * to serialize with collect_signal() or with @@ -1879,10 +1878,7 @@ int send_sigqueue(struct sigqueue *q, struct pid *pid, enum pid_type type) unsigned long flags; int ret, result; - if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC))) - return 0; - if (WARN_ON_ONCE(q->info.si_code != SI_TIMER)) - return 0; + BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); ret = -1; rcu_read_lock(); @@ -1901,6 +1897,7 @@ int send_sigqueue(struct sigqueue *q, struct pid *pid, enum pid_type type) * If an SI_TIMER entry is already queue just increment * the overrun count. */ + BUG_ON(q->info.si_code != SI_TIMER); q->info.si_overrun++; result = TRACE_SIGNAL_ALREADY_PENDING; goto out;