Commit 01c313dd authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds

kallsyms: fix building without printk

Building kallsyms fails without CONFIG_PRINTK due to a missing
declaration:

  kernel/kallsyms.c: In function 'kallsyms_show_value':
  kernel/kallsyms.c:670:10: error: 'kptr_restrict' undeclared (first use in this function); did you mean 'keyring_restrict'?

This moves the declaration outside of the #ifdef guard, the definition
is already available without CONFIG_PRINTK.

Fixes: c0f3ea15 ("stop using '%pK' for /proc/kallsyms pointer values")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
[ I clearly need to start doing "allnoconfig" builds too, or just have a
  test branch for the 0day robot - Linus ]
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 37c6b6f2
...@@ -189,7 +189,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, ...@@ -189,7 +189,6 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
extern int printk_delay_msec; extern int printk_delay_msec;
extern int dmesg_restrict; extern int dmesg_restrict;
extern int kptr_restrict;
extern int extern int
devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf, devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,
...@@ -280,6 +279,8 @@ static inline void printk_safe_flush_on_panic(void) ...@@ -280,6 +279,8 @@ static inline void printk_safe_flush_on_panic(void)
} }
#endif #endif
extern int kptr_restrict;
extern asmlinkage void dump_stack(void) __cold; extern asmlinkage void dump_stack(void) __cold;
#ifndef pr_fmt #ifndef pr_fmt
......
Markdown is supported
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