NetBSD-Bugs archive

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

Re: kern/50664: "cd .." over NFS/ZFS can panic kernel



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

From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: marcotte%panix.com@localhost
Subject: Re: kern/50664: "cd .." over NFS/ZFS can panic kernel
Date: Sun, 17 Jan 2016 13:21:04 +0100

 --Apple-Mail=_7C9C5061-DDD1-47BE-B448-340D916A353D
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 So we are looking up DOTDOT (..) and get DOT (.).
 
 Could you try to dump the file handles from /net/u/.zfs/shares directories?
 
 Compile the little program attached and run it as root.
 
 --
 J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
 
 --Apple-Mail=_7C9C5061-DDD1-47BE-B448-340D916A353D
 Content-Disposition: attachment;
 	filename=fh.c
 Content-Type: application/octet-stream;
 	name="fh.c"
 Content-Transfer-Encoding: 7bit
 
 
 #include <sys/types.h>
 #include <sys/mount.h>
 
 #include <err.h>
 #include <stdio.h>
 
 int
 main(int argc, char **argv)
 {
 	int i, p;
 	size_t fhsz;
 	uint8_t fhbuf[512];
 	char *paths[] = {
 		"/net/.",
 		"/net/u/.",
 		"/net/u/.zfs/.",
 		"/net/u/.zfs/shares/.",
 		NULL
 	};
 
 	for (i = 0; paths[i] != NULL; i++) {
 		fhsz = sizeof(fhbuf);
 		if (getfh(paths[i], &fhbuf[0], &fhsz) != 0)
 			err(1, "getfh \"%s\"", paths[i]);
 		printf("\"%s\" -> %zd:", paths[i], fhsz);
 		for (p = 0; p < fhsz; p++)
 			printf(" %02x", fhbuf[p]);
 		printf("\n");
 	}
 
 	return 0;
 }
 
 --Apple-Mail=_7C9C5061-DDD1-47BE-B448-340D916A353D--
 


Home | Main Index | Thread Index | Old Index