Unverified Commit d7e5d3f9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents a8a9daf9 ef480b9b
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1744,10 +1744,11 @@ struct sigqueue *sigqueue_alloc(void)

void sigqueue_free(struct sigqueue *q)
{
	unsigned long flags;
	spinlock_t *lock = &current->sighand->siglock;
	unsigned long flags;

	BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
	if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC)))
		return;
	/*
	 * We must hold ->siglock while testing q->list
	 * to serialize with collect_signal() or with
@@ -1775,7 +1776,10 @@ int send_sigqueue(struct sigqueue *q, struct pid *pid, enum pid_type type)
	unsigned long flags;
	int ret, result;

	BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
	if (WARN_ON_ONCE(!(q->flags & SIGQUEUE_PREALLOC)))
		return 0;
	if (WARN_ON_ONCE(q->info.si_code != SI_TIMER))
		return 0;

	ret = -1;
	rcu_read_lock();
@@ -1794,7 +1798,6 @@ 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;