Subject: Re: CVS commit: syssrc/sys/compat/linux/common
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 03/24/2002 10:04:12
On Mar 24, 10:43am, jdolecek@netbsd.org (Jaromir Dolecek) wrote:
-- Subject: Re: CVS commit: syssrc/sys/compat/linux/common

| fp = fd_getfile(..)
| if (fp->f_type == ...) {
| 	cmd = XX;
| 	break; /* fp pointer no longer used */
| }
| vp = (struct vnode *)fp->f_data;
| /* fp pointer no longer used */
| 
| There already IS possible race condition between fd_getfile() and
| later checks, even FILE_USE(). Note also that i.e. sys_read(),
| sys_write(), sys_pread(), sys_pwrite() also check fp->f_flag (and
| eventually bail out) before FILE_USE().

There is no reason to site other wrong examples. Just fix them :-)

christos