]>
Commit | Line | Data |
---|---|---|
3d4ecfe4 SL |
1 | From 2e2db60a5eafce0c5346a018aaea7254079a7482 Mon Sep 17 00:00:00 2001 |
2 | From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> | |
3 | Date: Wed, 24 Apr 2019 10:52:53 +0200 | |
4 | Subject: smpboot: Place the __percpu annotation correctly | |
5 | ||
6 | [ Upstream commit d4645d30b50d1691c26ff0f8fa4e718b08f8d3bb ] | |
7 | ||
8 | The test robot reported a wrong assignment of a per-CPU variable which | |
9 | it detected by using sparse and sent a report. The assignment itself is | |
10 | correct. The annotation for sparse was wrong and hence the report. | |
11 | The first pointer is a "normal" pointer and points to the per-CPU memory | |
12 | area. That means that the __percpu annotation has to be moved. | |
13 | ||
14 | Move the __percpu annotation to pointer which points to the per-CPU | |
15 | area. This change affects only the sparse tool (and is ignored by the | |
16 | compiler). | |
17 | ||
18 | Reported-by: kbuild test robot <lkp@intel.com> | |
19 | Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> | |
20 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | |
21 | Cc: Paul E. McKenney <paulmck@linux.ibm.com> | |
22 | Cc: Peter Zijlstra <peterz@infradead.org> | |
23 | Cc: Thomas Gleixner <tglx@linutronix.de> | |
24 | Fixes: f97f8f06a49fe ("smpboot: Provide infrastructure for percpu hotplug threads") | |
25 | Link: http://lkml.kernel.org/r/20190424085253.12178-1-bigeasy@linutronix.de | |
26 | Signed-off-by: Ingo Molnar <mingo@kernel.org> | |
27 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
28 | --- | |
29 | include/linux/smpboot.h | 2 +- | |
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
31 | ||
32 | diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h | |
33 | index 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 | -- | |
46 | 2.20.1 | |
47 |