]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.123/smpboot-place-the-__percpu-annotation-correctly.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.123 / smpboot-place-the-__percpu-annotation-correctly.patch
CommitLineData
3d4ecfe4
SL
1From 2e2db60a5eafce0c5346a018aaea7254079a7482 Mon Sep 17 00:00:00 2001
2From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3Date: Wed, 24 Apr 2019 10:52:53 +0200
4Subject: smpboot: Place the __percpu annotation correctly
5
6[ Upstream commit d4645d30b50d1691c26ff0f8fa4e718b08f8d3bb ]
7
8The test robot reported a wrong assignment of a per-CPU variable which
9it detected by using sparse and sent a report. The assignment itself is
10correct. The annotation for sparse was wrong and hence the report.
11The first pointer is a "normal" pointer and points to the per-CPU memory
12area. That means that the __percpu annotation has to be moved.
13
14Move the __percpu annotation to pointer which points to the per-CPU
15area. This change affects only the sparse tool (and is ignored by the
16compiler).
17
18Reported-by: kbuild test robot <lkp@intel.com>
19Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
20Cc: Linus Torvalds <torvalds@linux-foundation.org>
21Cc: Paul E. McKenney <paulmck@linux.ibm.com>
22Cc: Peter Zijlstra <peterz@infradead.org>
23Cc: Thomas Gleixner <tglx@linutronix.de>
24Fixes: f97f8f06a49fe ("smpboot: Provide infrastructure for percpu hotplug threads")
25Link: http://lkml.kernel.org/r/20190424085253.12178-1-bigeasy@linutronix.de
26Signed-off-by: Ingo Molnar <mingo@kernel.org>
27Signed-off-by: Sasha Levin <sashal@kernel.org>
28---
29 include/linux/smpboot.h | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h
33index c174844cf663e..585e777a7f6ef 100644
34--- a/include/linux/smpboot.h
35+++ b/include/linux/smpboot.h
36@@ -31,7 +31,7 @@ struct smpboot_thread_data;
37 * @thread_comm: The base name of the thread
38 */
39 struct smp_hotplug_thread {
40- struct task_struct __percpu **store;
41+ struct task_struct * __percpu *store;
42 struct list_head list;
43 int (*thread_should_run)(unsigned int cpu);
44 void (*thread_fn)(unsigned int cpu);
45--
462.20.1
47