]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mount: Fix an incorrect assertion in kernel_mount()
authorMark Johnston <markj@FreeBSD.org>
Tue, 14 Jun 2022 15:36:00 +0000 (11:36 -0400)
committerMark Johnston <markj@FreeBSD.org>
Wed, 29 Jun 2022 14:12:33 +0000 (10:12 -0400)
commit353aa91c6457ef125c466610754788009d81d4d3
treea7db3d559d512859179080d0ded91a5742cf2b2c
parent65d8e97c4c23a0b27d9e0bc73e4150ebbb00b844
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)
sys/kern/vfs_mount.c