Re: fstat suddenly return -EINVAL [Was: Bus error on makeallyesconfig, kernelbuild with HEAD]

From: Sam Ravnborg
Date: Mon Nov 08 2010 - 13:22:40 EST


On Mon, Nov 08, 2010 at 07:38:13AM -0500, Ben Gamari wrote:
> On Mon, 8 Nov 2010 18:20:02 +0800, Américo Wang <xiyou.wangcong@xxxxxxxxx> wrote:
> > But fixdep should be compiled by the host compiler...
> >
> Very good point.
>
> > So, does this error also occur when you do non-cross compiling on the
> > same partition?
> >
> Hmm, it seems to be fine when not cross-compiling. Interesting.
>
> > Thanks for your testing!
>
> No worries!

Hi Ben - interesting information.

Do you see that this bug trigger for the same file always?
You could try to print out the filename if fstat fails.

If this happens while accessing the same file then try to
check if this file has any special permissions / security settings.
[I looked a bit on the kernel side of fstat() and it looked
like a security check could result in EINVAL].

Again if it is always the same file try if you can read it
using less/vi.

>From your previous posting it looks like you have some special setting
that impact your choice of HOST gcc.
Do you define HOSTCC somewhere?


Sam
--
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/