[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200618161750.178659-1-masahiroy@kernel.org>
Date: Fri, 19 Jun 2020 01:17:49 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
Ben Segall <bsegall@...gle.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Mel Gorman <mgorman@...e.de>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vincent Guittot <vincent.guittot@...aro.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] sched: fix thread_union::task visibility
When CONFIG_ARCH_TASK_STRUCT_ON_STACK=y (i.e. ARCH=ia64), task_struct
and the thread stack are shared.
The ifdef condition of CONFIG_ARCH_TASK_STRUCT_ON_STACK is opposite.
Now that the init thread stack is constructed by the linker script,
this is not a practical problem, but let's fix the code just in case.
Fixes: 0500871f21b2 ("Construct init thread stack in the linker script rather than by union")
Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---
include/linux/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b62e6aaf28f0..6d6c4d38c063 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1674,7 +1674,7 @@ extern void ia64_set_curr_task(int cpu, struct task_struct *p);
void yield(void);
union thread_union {
-#ifndef CONFIG_ARCH_TASK_STRUCT_ON_STACK
+#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
struct task_struct task;
#endif
#ifndef CONFIG_THREAD_INFO_IN_TASK
--
2.25.1
Powered by blists - more mailing lists