Date: Sat, 15 Oct 2022 18:52:10 GMT From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 39888ed7a3dc - main - kern_intr: Check for NULL event in intr_destroy() Message-ID: <202210151852.29FIqAtI060229@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=39888ed7a3dca81c5d5c886e699dbcf58953137f commit 39888ed7a3dca81c5d5c886e699dbcf58953137f Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2022-10-15 18:43:53 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2022-10-15 18:51:44 +0000 kern_intr: Check for NULL event in intr_destroy() It likely won't happen, but is consistent with the other functions of this KPI. Reviewed by: imp, jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D33479 --- sys/kern/kern_intr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index bcd5dc82864e..2d44e657b7f0 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -532,6 +532,9 @@ int intr_event_destroy(struct intr_event *ie) { + if (ie == NULL) + return (EINVAL); + mtx_lock(&event_lock); mtx_lock(&ie->ie_lock); if (!CK_SLIST_EMPTY(&ie->ie_handlers)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210151852.29FIqAtI060229>