parent
12406b34ef
commit
62994ec6e3
1 changed files with 4 additions and 7 deletions
|
@ -1847,11 +1847,10 @@ struct sigqueue *sigqueue_alloc(void)
|
||||||
|
|
||||||
void sigqueue_free(struct sigqueue *q)
|
void sigqueue_free(struct sigqueue *q)
|
||||||
{
|
{
|
||||||
spinlock_t *lock = ¤t->sighand->siglock;
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
spinlock_t *lock = ¤t->sighand->siglock;
|
||||||
|
|
||||||
if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC)))
|
BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
|
||||||
return;
|
|
||||||
/*
|
/*
|
||||||
* We must hold ->siglock while testing q->list
|
* We must hold ->siglock while testing q->list
|
||||||
* to serialize with collect_signal() or with
|
* 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;
|
unsigned long flags;
|
||||||
int ret, result;
|
int ret, result;
|
||||||
|
|
||||||
if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC)))
|
BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
|
||||||
return 0;
|
|
||||||
if (WARN_ON_ONCE(q->info.si_code != SI_TIMER))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
rcu_read_lock();
|
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
|
* If an SI_TIMER entry is already queue just increment
|
||||||
* the overrun count.
|
* the overrun count.
|
||||||
*/
|
*/
|
||||||
|
BUG_ON(q->info.si_code != SI_TIMER);
|
||||||
q->info.si_overrun++;
|
q->info.si_overrun++;
|
||||||
result = TRACE_SIGNAL_ALREADY_PENDING;
|
result = TRACE_SIGNAL_ALREADY_PENDING;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in a new issue