The revision https://svnweb.freebsd.org/base?view=revision&revision=313351 replaced ``if (h == NULL) return'' with KASSERT for ``h != NULL''. Now "graid label" shell command that leads to ``root_mount_rel(mdi->mdio_rootmount)'' call with NULL argument making kernel panic due to ``LIST_REMOVE(h, list)'' in the root_mount_rel() code. This needs to be fixed somehow.
Please take a look and decide if root_mount_rel() should be fixed back to check its argument for NULL or its GEOM consumers should be fixed to not pass NULL there.
A commit references this bug: Author: trasz Date: Tue Sep 5 14:32:56 UTC 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 Changes: head/sys/kern/vfs_mountroot.c
Committed with r323183 and MFC'd to stable/11 with r324268.