Commit 6ada7997 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Xia Fukun
Browse files

signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal

mainline inclusion
from mainline-v6.5-rc7
commit 8917bef3
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ETTA


CVE: NA

--------------------------------

Any time siginfo is not stored in the signal queue information is
lost.  Therefore set TRACE_SIGNAL_LOSE_INFO every time the code does
not allocate a signal queue entry, and a queue overflow abort is not
triggered.

Fixes: ba005e1f ("tracepoint: Add signal loss events")
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarXia Fukun <xiafukun@huawei.com>
parent 6cea0048
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
@@ -1163,8 +1163,8 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,

		userns_fixup_signal_uid(&q->info, t);

	} else if (!is_si_special(info)) {
		if (sig >= SIGRTMIN && info->si_code != SI_USER) {
	} else if (!is_si_special(info) &&
		   sig >= SIGRTMIN && info->si_code != SI_USER) {
		/*
		 * Queue overflow, abort.  We may abort if the
		 * signal was rt and sent by user using something
@@ -1180,7 +1180,6 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
		 */
		result = TRACE_SIGNAL_LOSE_INFO;
	}
	}

out_set:
	signalfd_notify(t, sig);