]> git.baikalelectronics.ru Git - kernel.git/commit
lib/test_printf.c: call wait_for_random_bytes() before plain %p tests
authorThierry Escande <thierry.escande@linaro.org>
Thu, 14 Jun 2018 22:28:15 +0000 (15:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Jun 2018 22:55:25 +0000 (07:55 +0900)
commit1023a106079b2768e6a76936ee95cee37babc335
tree5d812a5175222659875e96eb5b4907b8c1133f9a
parentd7cdb3d5b9e0e5d00ae0cf4f110e5296c959f50a
lib/test_printf.c: call wait_for_random_bytes() before 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)' instead.

This patch adds a call to wait_for_random_bytes() before plain 'p' tests
to make sure the crng is initialized.

Link: http://lkml.kernel.org/r/20180604113708.11554-1-thierry.escande@linaro.org
Signed-off-by: Thierry Escande <thierry.escande@linaro.org>
Acked-by: Tobin C. Harding <me@tobin.cc>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/test_printf.c