NetBSD-Bugs archive

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

Re: kern/44961: Kernel crash on relookup() syscall



The following reply was made to PR kern/44961; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/44961: Kernel crash on relookup() syscall
Date: Mon, 16 May 2011 07:15:39 +0000

 On Sun, May 15, 2011 at 07:05:04AM +0000, David Holland wrote:
  >  On Sat, May 14, 2011 at 08:25:03AM +0000, David Holland wrote:
  >   >  (I tried to replicate the problem by making simple rename calls, using
  >   >  path constructs that might yield "" like it's tripping on, and so far
  >   >  I can't find a case that dies)
  >  
  >  ...which was because I was testing the wrong kernel, duh.
 
 and now my test setup is borked (see current-users) but I believe the
 following patch will fix the problem:
 
 Index: vfs_lookup.c
 ===================================================================
 RCS file: /cvsroot/src/sys/kern/vfs_lookup.c,v
 retrieving revision 1.183
 diff -u -p -r1.183 vfs_lookup.c
 --- vfs_lookup.c       18 Apr 2011 00:47:24 -0000      1.183
 +++ vfs_lookup.c       16 May 2011 07:13:11 -0000
 @@ -1145,8 +1145,8 @@ namei_oneroot(struct namei_state *state,
                 * current node.
                 */
                if (cnp->cn_nameptr[0] == '\0') {
 -                      vref(searchdir);
                        foundobj = searchdir;
 +                      searchdir = NULL;
                        cnp->cn_flags |= ISLASTCN;
  
                        /* bleh */
 
 
 it is not really the right patch but it restores the "logic" for this
 case to the way it was before I rearranged stuff last.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index