Re: Fwd: Re: UML kernel crash of v2.6.36-rcX kernel

From: Geert Uytterhoeven
Date: Mon Oct 18 2010 - 05:08:17 EST


2010/10/18 Toralf FÃrster <toralf.foerster@xxxxxx>:
>
> Christoph Hellwig wrote at 22:18:37
>> I really can't see any relation to the patch. ÂCan you try the some
>> things in the following order, please:
> ...
>> Â(4) re-apply the include/linux/statfs.h changes and see if it still
>> Â Â Â boots
>
> The first half of step 4 was it (I did not apply the "Definitions for the flag
> in f_flag.") :
>
> diff --git a/include/linux/statfs.h b/include/linux/statfs.h
> index b34cc82..0166d32 100644
> --- a/include/linux/statfs.h
> +++ b/include/linux/statfs.h
> @@ -2,7 +2,6 @@
> Â#define _LINUX_STATFS_H
>
> Â#include <linux/types.h>
> -
> Â#include <asm/statfs.h>
>
> Âstruct kstatfs {
> @@ -16,7 +15,29 @@ struct kstatfs {
> Â Â Â Â__kernel_fsid_t f_fsid;
> Â Â Â Âlong f_namelen;
> Â Â Â Âlong f_frsize;
> - Â long f_spare[5];
> + long f_flags;
> + long f_spare[4];
> Â};

That should only matter for code that accesses the former fifth
element of f_spare[].
fs/compat.c:put_compat_statfs(struct compat_statfs __user *ubuf,
struct kstatfs *kbuf) does that:

__put_user(0, &ubuf->f_spare[0]) ||
__put_user(0, &ubuf->f_spare[1]) ||
__put_user(0, &ubuf->f_spare[2]) ||
__put_user(0, &ubuf->f_spare[3]) ||
__put_user(0, &ubuf->f_spare[4]))

Seems struct compat_statfs* may have 4, 5, or 6 elements in the f_spare[] array,
depending on the architecture.

> FWIW the uml kernel boots fine even with that commit however it crashed after
> a special http request : $> wget http://n22_uml/phpsysinfo/

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
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/