Port-alpha archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Fix for PR/39255: compat osf1 loader problem
Hi,
Here follow a small patch that seems to fix my PR kern/39255 about
Tru64 dynamic executables not running anymore under compat osf1.
The problem was that the namei() call in osf1_exec_ecoff_dynamic was
failing. But as, emul_find_interp do the namei dance and save the
interpreter vnode for further use, we don't need it anymore.
I'm not a namei/vnode expert, and would like to have others
review/test it ...
Thanks.
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Index: sys/compat/osf1/osf1_exec_ecoff.c
===================================================================
RCS file: /cvsroot/src/sys/compat/osf1/osf1_exec_ecoff.c,v
retrieving revision 1.20
diff -u -p -r1.20 osf1_exec_ecoff.c
--- sys/compat/osf1/osf1_exec_ecoff.c 9 Dec 2007 13:34:24 -0000 1.20
+++ sys/compat/osf1/osf1_exec_ecoff.c 14 Nov 2008 14:10:19 -0000
@@ -184,7 +184,6 @@ osf1_exec_ecoff_dynamic(struct lwp *l, s
{
struct osf1_exec_emul_arg *emul_arg = epp->ep_emul_arg;
struct ecoff_exechdr ldr_exechdr;
- struct nameidata nd;
struct vnode *ldr_vp;
size_t resid;
int error;
@@ -212,11 +211,9 @@ osf1_exec_ecoff_dynamic(struct lwp *l, s
* make sure the object type is amenable, then arrange to
* load it up.
*/
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | TRYEMULROOT, UIO_SYSSPACE,
- emul_arg->loader_name);
- if ((error = namei(&nd)) != 0)
- goto bad_no_vp;
- ldr_vp = nd.ni_vp;
+ ldr_vp = epp->ep_interp;
+ epp->ep_interp = NULL;
+ vn_lock(ldr_vp, LK_EXCLUSIVE | LK_RETRY);
/*
* Basic access checks. Reject if:
@@ -303,6 +300,5 @@ badunlock:
VOP_UNLOCK(ldr_vp, 0);
bad:
vrele(ldr_vp);
-bad_no_vp:
return (error);
}
Home |
Main Index |
Thread Index |
Old Index