Module Name: src Committed By: dholland Date: Mon May 16 15:09:31 UTC 2011
Modified Files: src/sys/kern: vfs_lookup.c Log Message: Hack for PR 44961: restore the prior "logic" pertaining to looking up / to prevent a crash when attempting rename("/", "foo"). This is not really what I want going forward and it may cause e.g. rmdir("blah/") to fail, so if it causes trouble for anyone back it out. The right fix is going to have to wait until the qemu/tcp_vtw problems I ran into last night get sorted out. To generate a diff of this commit: cvs rdiff -u -r1.183 -r1.184 src/sys/kern/vfs_lookup.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/kern/vfs_lookup.c diff -u src/sys/kern/vfs_lookup.c:1.183 src/sys/kern/vfs_lookup.c:1.184 --- src/sys/kern/vfs_lookup.c:1.183 Mon Apr 18 00:47:24 2011 +++ src/sys/kern/vfs_lookup.c Mon May 16 15:09:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.183 2011/04/18 00:47:24 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.184 2011/05/16 15:09:31 dholland Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.183 2011/04/18 00:47:24 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.184 2011/05/16 15:09:31 dholland Exp $"); #include "opt_magiclinks.h" @@ -1145,8 +1145,8 @@ * current node. */ if (cnp->cn_nameptr[0] == '\0') { - vref(searchdir); foundobj = searchdir; + searchdir = NULL; cnp->cn_flags |= ISLASTCN; /* bleh */