Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs CID/1203190: Fix NULL deref



details:   https://anonhg.NetBSD.org/src/rev/e26813bdba8c
branches:  trunk
changeset: 795525:e26813bdba8c
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 17 15:57:41 2014 +0000

description:
CID/1203190: Fix NULL deref

diffstat:

 sys/ufs/lfs/lfs_syscalls.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 584e0d001b75 -r e26813bdba8c sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c        Thu Apr 17 15:55:53 2014 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c        Thu Apr 17 15:57:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_syscalls.c,v 1.153 2014/04/09 22:44:15 riastradh Exp $     */
+/*     $NetBSD: lfs_syscalls.c,v 1.154 2014/04/17 15:57:41 christos Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.153 2014/04/09 22:44:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.154 2014/04/17 15:57:41 christos Exp $");
 
 #ifndef LFS
 # define LFS           /* for prototypes in syscallargs.h */
@@ -754,7 +754,8 @@
                                }
                                numrefed++;
                        } else {
-                               mutex_exit(vp->v_interlock);
+                               if (vp != null)
+                                       mutex_exit(vp->v_interlock);
                                mutex_exit(&ulfs_ihash_lock);
                                /*
                                 * Don't VFS_VGET if we're being unmounted,



Home | Main Index | Thread Index | Old Index