Re: [PATCH] Support ia32 exec domains without CONFIG_IA32_SUPPORT

From: Jakub Jelinek
Date: Thu Oct 14 2004 - 03:52:38 EST


On Tue, Oct 12, 2004 at 03:46:39PM -0700, Arun Sharma wrote:
> --- linux-2.6-cvs/fs/namei.c 2 Oct 2004 17:59:55 -0000 1.110
> +++ linux-2.6-cvs/fs/namei.c 8 Oct 2004 18:14:11 -0000
> @@ -897,7 +897,7 @@
> return 1;
> }
>
> -void set_fs_altroot(void)
> +int set_fs_altroot(const char __user *altroot)
> {
> char *emul = __emul_prefix();

I think you should change this to char *emul;

> struct nameidata nd;
> @@ -905,12 +905,20 @@
> struct dentry *dentry = NULL, *olddentry;
> int err;
>
> + if (altroot) {
> + emul = getname(altroot);
> + if (IS_ERR(emul))
> + return PTR_ERR(emul);
> + }
> +

and add here
else
emul = __emul_prefix();

There is no point in calling __emul_prefix () when it will be thrown away.

Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/