Date: Tue, 5 Sep 2017 14:32:56 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323183 - head/sys/kern Message-ID: <201709051432.v85EWuJn099792@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709051432.v85EWuJn099792>