Date: Wed, 4 Oct 2017 11:58:53 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r324268 - stable/11/sys/kern Message-ID: <201710041158.v94BwrZH012312@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Wed Oct 4 11:58:52 2017 New Revision: 324268 URL: https://svnweb.freebsd.org/changeset/base/324268 Log: MFC r323183: 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". Modified: stable/11/sys/kern/vfs_mountroot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_mountroot.c ============================================================================== --- stable/11/sys/kern/vfs_mountroot.c Wed Oct 4 11:55:34 2017 (r324267) +++ stable/11/sys/kern/vfs_mountroot.c Wed Oct 4 11:58:52 2017 (r324268) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710041158.v94BwrZH012312>