Re: [PATCH] Fix print out of function which called WARN_ON()

From: Hugh Dickins
Date: Sun May 17 2009 - 10:44:30 EST


On Sat, 16 May 2009, Linus Torvalds wrote:
>
> This patch not only avoids the warnings and gets the right caller
> information, it cleans up the code too:
>
> - it uses '%pS' instead of of sprint_symbol

> - char function[KSYM_SYMBOL_LEN];

This should be a big improvement, because that buffer on the stack
was netting lots of stale return addresses, printed out with ?s in
the warning's dump_stack(). I had been wanting to add a memset,
but your %pS should circumvent the need for that nicely.

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