HomeFreeBSD

Avoid a null pointer dereference in zfs_mount() on FreeBSD

Description

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

Details

Provenance
allanjudeAuthored on Nov 28 2022, 9:40 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 6 2023, 6:40 PM
Parents
rG5161e5d8a40e: Allow mounting snapshots in .zfs/snapshot as a regular user
Branches
Unknown
Tags
Unknown