From 09d5360be313d62e2743dbee1472cbea6bb9e062 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Tue, 9 Aug 2022 20:31:29 -0700 Subject: [PATCH] Kernel: Validate the sys$alarm signal send always succeeds Previously we were ignoring this return code, instead use MUST(..) to make sure it always succeeds. --- Kernel/Syscalls/alarm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/alarm.cpp b/Kernel/Syscalls/alarm.cpp index da57219c25..52f730cf80 100644 --- a/Kernel/Syscalls/alarm.cpp +++ b/Kernel/Syscalls/alarm.cpp @@ -34,7 +34,7 @@ ErrorOr Process::sys$alarm(unsigned seconds) m_alarm_timer = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) Timer)); } auto timer_was_added = TimerQueue::the().add_timer_without_id(*m_alarm_timer, CLOCK_REALTIME_COARSE, deadline, [this]() { - [[maybe_unused]] auto rc = send_signal(SIGALRM, nullptr); + MUST(send_signal(SIGALRM, nullptr)); }); if (!timer_was_added) return ENOMEM;