Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/kern Pull up following revision(s) (requested by dh i...



details:   https://anonhg.NetBSD.org/src/rev/fb1a1eda57cc
branches:  netbsd-7
changeset: 800250:fb1a1eda57cc
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 10 13:12:04 2017 +0000

description:
Pull up following revision(s) (requested by dh in ticket #1451):
        sys/kern/vfs_lookup.c: revision 1.208
Fix vnode leak on error, introduced by the openat family changes in -r1.200.
>From mjg@freebsd.

diffstat:

 sys/kern/vfs_lookup.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a8703af65524 -r fb1a1eda57cc sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c     Sun Jul 09 04:37:40 2017 +0000
+++ b/sys/kern/vfs_lookup.c     Mon Jul 10 13:12:04 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_lookup.c,v 1.201 2014/02/07 15:29:22 hannken Exp $ */
+/*     $NetBSD: vfs_lookup.c,v 1.201.4.1 2017/07/10 13:12:04 martin Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.201 2014/02/07 15:29:22 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.201.4.1 2017/07/10 13:12:04 martin Exp $");
 
 #include "opt_magiclinks.h"
 
@@ -678,8 +678,10 @@
        }
 
        /* NDAT may feed us with a non directory namei_getstartdir */
-       if (startdir->v_type != VDIR)
+       if (startdir->v_type != VDIR) {
+               vrele(startdir);
                return ENOTDIR;
+       }
 
        vn_lock(startdir, LK_EXCLUSIVE | LK_RETRY);
 



Home | Main Index | Thread Index | Old Index