svn commit: r323183 - head/sys/kern
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Sep 5 14:32:58 UTC 2017
Author: trasz
Date: Tue Sep 5 14:32:56 2017
New Revision: 323183
URL: https://svnweb.freebsd.org/changeset/base/323183
Log:
Make root_mount_rel(9) ignore NULL arguments, like it used to before r313351.
It would be better to fix API consumers to not pass NULL there - most of them,
such as gmirror, already contain the neccessary checks - but this is easier
and much less error-prone.
One known user-visible result is that it fixes panic on a failed "graid label".
PR: 221846
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Modified:
head/sys/kern/vfs_mountroot.c
Modified: head/sys/kern/vfs_mountroot.c
==============================================================================
--- head/sys/kern/vfs_mountroot.c Tue Sep 5 13:55:14 2017 (r323182)
+++ head/sys/kern/vfs_mountroot.c Tue Sep 5 14:32:56 2017 (r323183)
@@ -183,7 +183,8 @@ void
root_mount_rel(struct root_hold_token *h)
{
- KASSERT(h != NULL, ("%s: NULL token", __func__));
+ if (h == NULL)
+ return;
mtx_lock(&root_holds_mtx);
LIST_REMOVE(h, list);
More information about the svn-src-head
mailing list