]> git.proxmox.com Git - mirror_zfs.git/commit
Avoid a null pointer dereference in zfs_mount() on FreeBSD
authorAllan Jude <allan@klarasystems.com>
Mon, 28 Nov 2022 21:40:49 +0000 (16:40 -0500)
committerGitHub <noreply@github.com>
Mon, 28 Nov 2022 21:40:49 +0000 (13:40 -0800)
commitd27a00283faf4ec2b997ff2376dee4a080e1ca7b
tree5e60d06b1f5ebc53e1cbf0cff5b8752aab195505
parent3069872ef5dcffd5343a9165ce08356a840a70d1
Avoid a null pointer dereference in zfs_mount() on FreeBSD

When mounting the root filesystem, vfs_t->mnt_vnodecovered is null

This will cause zfsctl_is_node() to dereference a null pointer when
mounting, or updating the mount flags, on the root filesystem, both
of which happen during the boot process.

Reported-by: Martin Matuska <mm@FreeBSD.org>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #14218
module/os/freebsd/zfs/zfs_vfsops.c