freebsd-nq/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 Mark most often used sysctl's as MPSAFE. 2009-01-28 19:58:05 +00:00
devfs_int.h Struct cdev is always the member of the struct cdev_priv. When devfs 2008-06-16 17:34:59 +00:00
devfs_rule.c Get pointer to devfs_ruleset struct after garbage collection has been 2008-06-22 14:34:38 +00:00
devfs_vfsops.c Remove the thread argument from the FSD (File-System Dependent) parts of 2009-05-11 15:33:26 +00:00
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 Remove the thread argument from the FSD (File-System Dependent) parts of 2009-05-11 15:33:26 +00:00