aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2023-11-28 12:51:54 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2023-12-05 00:43:27 +0000
commit24346a2f777598272caffbd7e4fb6d85cafe64ed (patch)
tree73394a12f9253fe784e43a89c3b326c41e3f1b5f
parent468605fd3c389545645ed4d9e5ed889752cf8a0e (diff)
downloadsrc-24346a2f777598272caffbd7e4fb6d85cafe64ed.tar.gz
src-24346a2f777598272caffbd7e4fb6d85cafe64ed.zip
EVFILT_SIGNAL: do not use target process pointer on detach
PR: 275286 (cherry picked from commit ed410b78edc53e17b5a3e93ace2adbeb3a734ae9)
-rw-r--r--sys/kern/kern_sig.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index c847783cd3da..d35c35a534f9 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -4298,9 +4298,7 @@ filt_sigattach(struct knote *kn)
static void
filt_sigdetach(struct knote *kn)
{
- struct proc *p = kn->kn_ptr.p_proc;
-
- knlist_remove(p->p_klist, kn, 0);
+ knlist_remove(kn->kn_knlist, kn, 0);
}
/*