Module Name:    src
Committed By:   pooka
Date:           Thu Apr  2 11:33:04 UTC 2009

Modified Files:
        src/sys/ufs/ufs: ufs_wapbl.c

Log Message:
Release tdvp in an appropriate VOP_RENAME error branch to avoid
panic described in PR kern/40948.

As usual, all the error branches in rename live based on an unholy
amalgamation of prayer and the blood of cute, furry and tasty
quadrupeds, so I won't even attempt to audit the rest.

And this wapbl rename really really needs to be merged with the
standard rename.  That should be a fun PhD thesis topic ....


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/ufs/ufs_wapbl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ufs/ufs_wapbl.c
diff -u src/sys/ufs/ufs/ufs_wapbl.c:1.5 src/sys/ufs/ufs/ufs_wapbl.c:1.6
--- src/sys/ufs/ufs/ufs_wapbl.c:1.5	Sun Feb 22 20:28:07 2009
+++ src/sys/ufs/ufs/ufs_wapbl.c	Thu Apr  2 11:33:04 2009
@@ -1,4 +1,4 @@
-/*  $NetBSD: ufs_wapbl.c,v 1.5 2009/02/22 20:28:07 ad Exp $ */
+/*  $NetBSD: ufs_wapbl.c,v 1.6 2009/04/02 11:33:04 pooka Exp $ */
 
 /*-
  * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_wapbl.c,v 1.5 2009/02/22 20:28:07 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_wapbl.c,v 1.6 2009/04/02 11:33:04 pooka Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -357,6 +357,8 @@
 	} else {
 		error = VOP_LOOKUP(fdvp, &fvp, fcnp);
 		if (error && (error != EJUSTRETURN)) {
+			vput(ITOV(tdp));
+			tdp = NULL;
 			vrele(ap->a_fvp);
 			goto out2;
 		}

Reply via email to