Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/smbfs Avoid use after pool_put.



details:   https://anonhg.NetBSD.org/src/rev/624d054b3309
branches:  trunk
changeset: 333996:624d054b3309
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Tue Nov 25 12:33:13 2014 +0000

description:
Avoid use after pool_put.

diffstat:

 sys/fs/smbfs/smbfs_node.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 8930faef2da1 -r 624d054b3309 sys/fs/smbfs/smbfs_node.c
--- a/sys/fs/smbfs/smbfs_node.c Tue Nov 25 12:02:20 2014 +0000
+++ b/sys/fs/smbfs/smbfs_node.c Tue Nov 25 12:33:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_node.c,v 1.51 2014/01/28 13:23:49 martin Exp $   */
+/*     $NetBSD: smbfs_node.c,v 1.52 2014/11/25 12:33:13 nakayama Exp $ */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.51 2014/01/28 13:23:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.52 2014/11/25 12:33:13 nakayama Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -197,10 +197,10 @@
                    || memcmp(name, np2->n_name, nmlen) != 0)
                        continue;
                mutex_exit(&smp->sm_hashlock);
-               pool_put(&smbfs_node_pool, np);
-               ungetnewvnode(vp);
                if ((np->n_flag & NREFPARENT) != 0)
                        vrele(dvp);
+               ungetnewvnode(vp);
+               pool_put(&smbfs_node_pool, np);
                goto retry;
        }
 



Home | Main Index | Thread Index | Old Index