Date: Fri, 15 May 2009 19:23:05 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/fs/devfs devfs_vnops.c Message-ID: <200905151923.n4FJNGs4057534@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2009-05-15 19:23:05 UTC FreeBSD src repository Modified files: sys/fs/devfs devfs_vnops.c Log: SVN rev 192151 on 2009-05-15 19:23:05Z by kib 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 Revision Changes Path 1.178 +3 -1 src/sys/fs/devfs/devfs_vnops.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905151923.n4FJNGs4057534>