Skip to content
Commit ce041c43 authored by Thierry Escande's avatar Thierry Escande Committed by Petr Mladek
Browse files

lib/test_printf.c: accept "ptrval" as valid result for plain 'p' tests

If the test_printf module is loaded before the crng is initialized, the
plain 'p' tests will fail because the printed address will not be hashed
and the buffer will contain "(____ptrval____)" or "(ptrval)" instead
(64-bit vs 32-bit).
Since we cannot wait for the crng to be initialized for an undefined
time, both plain 'p' tests now accept the strings "(____ptrval____)" or
"(ptrval)" as a valid result and print a warning message.

Link: http://lkml.kernel.org/r/20180613171840.29827-1-thierry.escande@linaro.org


Fixes: ad67b74d ("printk: hash addresses printed with %p")
To: Andrew Morton <akpm@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "Tobin C . Harding" <me@tobin.cc>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarThierry Escande <thierry.escande@linaro.org>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent d75ae5bd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment