Prevent infinite userspace crash loops.

This commit is contained in:
4lDO2
2024-06-20 22:56:19 +02:00
parent 55fe58adf6
commit 7d5b2e6c21
5 changed files with 18 additions and 6 deletions
+2 -2
View File
@@ -176,8 +176,8 @@ pub fn kill(pid: ContextId, sig: usize) -> Result<usize> {
} else if sig == SIGKILL {
context.being_sigkilled = true;
} else if let Some((ctl, _, st)) = context.sigcontrol() {
let was_new = ctl.word[sig_group].fetch_or(sig_bit(sig), Ordering::Relaxed);
if (ctl.word[sig_group].load(Ordering::Relaxed) >> 32) & sig_bit(sig) != 0 {
let _was_new = ctl.word[sig_group].fetch_or(sig_bit(sig), Ordering::Relaxed);
if (ctl.word[sig_group].load(Ordering::Relaxed) >> 32) & sig_bit(sig) == 0 {
st.is_pending = true;
}
} else {