Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/fe17bb86edfa
branches:  netbsd-7-1
changeset: 800745:fe17bb86edfa
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 10 13:13:15 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 9a817bd3467d -r fe17bb86edfa sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c     Sat Jul 08 17:17:58 2017 +0000
+++ b/sys/kern/vfs_lookup.c     Mon Jul 10 13:13:15 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.12.1 2017/07/10 13:13:15 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.12.1 2017/07/10 13:13:15 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