freebsd-dev/sys/fs/devfs
Konstantin Belousov 0e9bd89d7d Devfs replaces file ops vector with devfs-specific one in devfs_open(),
before the struct file is fully initialized in vn_open(), in particular,
fp->f_vnode is NULL. Other thread calling file operation before f_vnode
is set results in NULL pointer dereference in devvn_refthread().

Initialize f_vnode before calling d_fdopen() cdevsw method, that might
set file ops too.

Reported and tested by:	Chris Timmons <cwt networks cwu edu>
	(RELENG_7 version)
MFC after:	3 days
2009-05-15 19:23:05 +00:00
..
devfs_devs.c
devfs_int.h
devfs_rule.c
devfs_vfsops.c
devfs_vnops.c Devfs replaces file ops vector with devfs-specific one in devfs_open(), 2009-05-15 19:23:05 +00:00
devfs.h