NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/54378 (panic with TLB miss when attempting to reboot)
The following reply was made to PR kern/54378; it has been noted by GNATS.
From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: dholland%NetBSD.org@localhost
Subject: Re: kern/54378 (panic with TLB miss when attempting to reboot)
Date: Wed, 17 Jul 2019 12:20:14 +0200
On Tue, Jul 16, 2019 at 02:42:56PM +0000, dholland%NetBSD.org@localhost wrote:
> I suspect the recent rootdir refcount changes in namei; could you take a
> quick look? If not, please set it to me...
No, we have "rootvnode == NULL", call namei() for "/mnt/netbsd" and
come to namei_getstartdir(). Here we have "startdir == rootvnode == NULL",
try to reference with vref(startdir) and bomb.
This patch should fix it, please give it a try.
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
diff -r be1f0ec66ecd sys/kern/vfs_lookup.c
--- sys/kern/vfs_lookup.c Wed Jul 17 10:51:07 2019 +0200
+++ sys/kern/vfs_lookup.c Wed Jul 17 11:36:42 2019 +0200
@@ -1563,6 +1563,9 @@ namei(struct nameidata *ndp)
struct namei_state state;
int error;
+ if (rootvnode == NULL)
+ return ENOENT;
+
namei_init(&state, ndp);
error = namei_tryemulroot(&state,
0/*!neverfollow*/, 0/*!inhibitmagic*/,
@@ -1597,6 +1600,9 @@ lookup_for_nfsd(struct nameidata *ndp, s
struct namei_state state;
int error;
+ if (rootvnode == NULL)
+ return ENOENT;
+
KASSERT(ndp->ni_atdir == NULL);
ndp->ni_atdir = forcecwd;
Home |
Main Index |
Thread Index |
Old Index