mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
Check that vp->v_mount is non-null in fsync() before dereferencing it to
obtain the mountpoint's MNT_ASYNC flag. This is a Very Definite Last-Minute 2.2 Bugfix Candidate. Reviewed by: sef
This commit is contained in:
parent
0b146b65d2
commit
3a558f83dd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23387
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
|
||||
* $Id$
|
||||
* $Id: vfs_syscalls.c,v 1.58 1997/02/22 09:39:35 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -2175,7 +2175,8 @@ fsync(p, uap, retval)
|
||||
vm_object_page_clean(vp->v_object, 0, 0 ,0, FALSE);
|
||||
}
|
||||
error = VOP_FSYNC(vp, fp->f_cred,
|
||||
(vp->v_mount->mnt_flag & MNT_ASYNC) ? MNT_NOWAIT : MNT_WAIT, p);
|
||||
(vp->v_mount && (vp->v_mount->mnt_flag & MNT_ASYNC)) ?
|
||||
MNT_NOWAIT : MNT_WAIT, p);
|
||||
VOP_UNLOCK(vp, 0, p);
|
||||
return (error);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
|
||||
* $Id$
|
||||
* $Id: vfs_syscalls.c,v 1.58 1997/02/22 09:39:35 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -2175,7 +2175,8 @@ fsync(p, uap, retval)
|
||||
vm_object_page_clean(vp->v_object, 0, 0 ,0, FALSE);
|
||||
}
|
||||
error = VOP_FSYNC(vp, fp->f_cred,
|
||||
(vp->v_mount->mnt_flag & MNT_ASYNC) ? MNT_NOWAIT : MNT_WAIT, p);
|
||||
(vp->v_mount && (vp->v_mount->mnt_flag & MNT_ASYNC)) ?
|
||||
MNT_NOWAIT : MNT_WAIT, p);
|
||||
VOP_UNLOCK(vp, 0, p);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user