diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index d99df8b..0df7e5a 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -208,6 +208,7 @@ lock_init(struct lock_object *lock, stru break; } KASSERT(i < LOCK_CLASS_MAX, ("unknown lock class %p", class)); + KASSERT(name != NULL, ("lock has no name")); /* Initialize the lock object. */ lock->lo_name = name;