aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 9004bbb3d84d..97be2d07297a 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1681,12 +1681,13 @@ early_initcall(initialize_ptr_random);
1681/* Maps a pointer to a 32 bit unique identifier. */ 1681/* Maps a pointer to a 32 bit unique identifier. */
1682static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec) 1682static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec)
1683{ 1683{
1684 const char *str = sizeof(ptr) == 8 ? "(____ptrval____)" : "(ptrval)";
1684 unsigned long hashval; 1685 unsigned long hashval;
1685 1686
1686 if (unlikely(!have_filled_random_ptr_key)) { 1687 if (unlikely(!have_filled_random_ptr_key)) {
1687 spec.field_width = 2 * sizeof(ptr); 1688 spec.field_width = 2 * sizeof(ptr);
1688 /* string length must be less than default_width */ 1689 /* string length must be less than default_width */
1689 return string(buf, end, "(ptrval)", spec); 1690 return string(buf, end, str, spec);
1690 } 1691 }
1691 1692
1692#ifdef CONFIG_64BIT 1693#ifdef CONFIG_64BIT