HomeFreeBSD

mount: Fix an incorrect assertion in kernel_mount()

Description

mount: Fix an incorrect assertion in kernel_mount()

The pointer to the mount values may be null if an error occurred while
copying them in, so fix the assertion condition to reflect that
possibility.

While here, move some initialization code into the error == 0 block. No
functional change intended.

Reported by: syzkaller
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 7565431f30909e67b1fd811155eb8788421e51d9)

Details

Provenance
markjAuthored on Jun 14 2022, 3:36 PM
Parents
rG65d8e97c4c23: UFS: make mkdir() and link() reliable when using SU and reaching nlink limit
Branches
Unknown
Tags
Unknown