git: ed410b78edc5 - main - EVFILT_SIGNAL: do not use target process pointer on detach
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Nov 2023 17:30:07 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ed410b78edc53e17b5a3e93ace2adbeb3a734ae9 commit ed410b78edc53e17b5a3e93ace2adbeb3a734ae9 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-11-28 12:51:54 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-11-28 17:29:58 +0000 EVFILT_SIGNAL: do not use target process pointer on detach It is enough to know knlist to remove from it, and the list is autodestroyed on last removal. PR: 275286 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42777 --- sys/kern/kern_sig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 230564adf823..a2ca74ac9183 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -4296,9 +4296,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); } /*