freebsd-nq/sys/fs/devfs
Konstantin Belousov 833429229a In devfs_lookupx() dotdot lookup case, avoid dereferencing
dvp->v_mount after dvp is unlocked.

The vnode might be reclaimed after unlock, so v_mount becomes NULL.
Cache the struct mount pointer before the unlock, the struct is
type-stable.

Note that devfs_allocv() reads mp->mnt_data but does not operate on it
further when dirent is doomed.  The unmount cannot proceed until all
dirents are reclaimed.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-12-14 13:41:11 +00:00
..
devfs_devs.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
devfs_dir.c r326394 is calling malloc with M_WAITOK under a lock, revert for now 2017-11-30 14:06:54 +00:00
devfs_int.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
devfs_rule.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
devfs_vfsops.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
devfs_vnops.c In devfs_lookupx() dotdot lookup case, avoid dereferencing 2017-12-14 13:41:11 +00:00
devfs.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00