Date: Tue, 23 Jun 2026 19:11:31 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 9d1baa1a87b0 - stable/14 - kobj: Assert class passed to kobj_init_static is compiled Message-ID: <6a3ada63.3e869.7a636250@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9d1baa1a87b070ff96ac01866635a01c5c7bc5ec commit 9d1baa1a87b070ff96ac01866635a01c5c7bc5ec Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-05-06 20:53:46 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-06-23 16:06:45 +0000 kobj: Assert class passed to kobj_init_static is compiled Inspired by discussion in https://github.com/freebsd/freebsd-src/pull/2016 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56624 (cherry picked from commit 5a6e5954d14b589bcba0125d10a6c7b62b588f4b) --- sys/kern/subr_kobj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c index 6569816d2ff0..38459f08b625 100644 --- a/sys/kern/subr_kobj.c +++ b/sys/kern/subr_kobj.c @@ -318,6 +318,8 @@ void kobj_init_static(kobj_t obj, kobj_class_t cls) { + KASSERT(cls->ops != NULL, + ("%s: class %p is not compiled", __func__, cls)); KASSERT(kobj_mutex_inited == 0, ("%s: only supported during early cycles", __func__));home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3ada63.3e869.7a636250>
