Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8917bef3 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal



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>
parent 2e1661d2
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
@@ -1131,8 +1131,8 @@ static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struc
			copy_siginfo(&q->info, info);
			break;
		}
	} 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
@@ -1148,7 +1148,6 @@ static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struc
		 */
		result = TRACE_SIGNAL_LOSE_INFO;
	}
	}

out_set:
	signalfd_notify(t, sig);