public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jump_label: mark __start/stop___jump_table const
@ 2017-02-09 21:11 Michael S. Tsirkin
  2017-02-09 21:40 ` Michael S. Tsirkin
  2017-02-10  5:01 ` kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2017-02-09 21:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jason Baron, Peter Zijlstra, Steven Rostedt, Borislav Petkov,
	Andrew Morton, Linus Torvalds, Thomas Gleixner, Mel Gorman,
	Ingo Molnar

Attempts to assign values through these pointers would fail.
Mark them const to make sure the failure is compile time.

Cc: Jason Baron <jbaron@akamai.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/linux/jump_label.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index a0547c5..48ed83f 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -132,8 +132,8 @@ static __always_inline bool static_key_true(struct static_key *key)
 	return !arch_static_branch(key, true);
 }
 
-extern struct jump_entry __start___jump_table[];
-extern struct jump_entry __stop___jump_table[];
+extern const struct jump_entry __start___jump_table[];
+extern const struct jump_entry __stop___jump_table[];
 
 extern void jump_label_init(void);
 extern void jump_label_lock(void);
-- 
MST

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-10  5:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 21:11 [PATCH] jump_label: mark __start/stop___jump_table const Michael S. Tsirkin
2017-02-09 21:40 ` Michael S. Tsirkin
2017-02-10  5:01 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox