]> 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)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 6 Feb 2023 18:40:16 +0000 (10:40 -0800)
commite45a981f6d12fbf37bd7e0dbf7d9992da6c3e14f
treea95242ee907c0fc3d0d73f326a8d8d56c25258d8
parent5161e5d8a40e59a691a3175f78f6e600dc5792b8
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