summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/linux/linux_misc.c')
-rw-r--r--sys/i386/linux/linux_misc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/i386/linux/linux_misc.c b/sys/i386/linux/linux_misc.c
index 36f1165..1835c9c 100644
--- a/sys/i386/linux/linux_misc.c
+++ b/sys/i386/linux/linux_misc.c
@@ -54,6 +54,7 @@
#include <vm/vm_kern.h>
#include <vm/vm_map.h>
#include <vm/vm_extern.h>
+#include <vm/vm_zone.h>
#include <machine/frame.h>
#include <machine/psl.h>
@@ -194,10 +195,15 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args)
goto cleanup;
vp = ni.ni_vp;
+ /*
+ * XXX This looks like a bogus check - a LOCKLEAF namei should not succeed
+ * without returning a vnode.
+ */
if (vp == NULL) {
error = ENOEXEC; /* ?? */
goto cleanup;
}
+ NDFREE(&ni, NDF_ONLY_PNBUF);
/*
* From here on down, we have a locked vnode that must be unlocked.
OpenPOWER on IntegriCloud