Re: BUG_ON(nd->inode != parent->d_inode);

From: Dave Jones
Date: Fri Mar 08 2013 - 18:55:24 EST


On Fri, Mar 08, 2013 at 03:45:37PM -0800, Linus Torvalds wrote:
> On Fri, Mar 8, 2013 at 3:30 PM, Dave Jones <davej@xxxxxxxxxx> wrote:
> > [ 100.729401] nd->last.name = (\xffffffd2.W._.N.".\xfffffffe.\xffffff80.^N.?.\xffffffe4.E.8.g.\xffffffd2.N.\xffffffb6.^G.\xfffffff1.\xffffffcc.U.\xffffffda.^_.h.^M.1.\xffffffc5.\xffffff82.%.B.\xffffffe0.\xffffffad.^U.8.^L.c.Z.^K.\xffffffe4.h.J.\xffffffc8.\xffffffad.\xffffff83./.\xffffff80.\xffffffd1.\xffffffe5.\xffffff87.\xffffffc3.\xffffffb2.\xffffffdc.\xffffff9d.\xffffffd1.E.\xffffffab.^B.
>
> You're printing out a 'char' with %02x, aren't you? And then the sign
> extensions gives you six extra 'f' character every time the char is
> negative.
>
> If using %02x, make sure you use 'unsigned char', or "& 255".
>
> Depending on just what is going on, the "nd->last.name" thing really
> is probably a valid string. Strictly speaking it's not necessarily
> NUL-terminated, though, and should be printed out to a maximum of
> "nd->last.len" characters (but the whole path will be NUL-terminated,
> so it's all ok, you just might print out more than one component)
>
> Linus

That one was printed out with %s

Dave

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