mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
sched: Fix KCSAN noinstr violation
With KCSAN enabled, end_of_stack() can get out-of-lined. Force it inline. Fixes the following warnings: vmlinux.o: warning: objtool: check_stackleak_irqoff+0x2b: call to end_of_stack() leaves .noinstr.text section Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/cc1b4d73d3a428a00d206242a68fdf99a934ca7b.1681320026.git.jpoimboe@kernel.org
This commit is contained in:
parent
fb799447ae
commit
e0b081d17a
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ static __always_inline void *task_stack_page(const struct task_struct *task)
|
||||||
|
|
||||||
#define setup_thread_stack(new,old) do { } while(0)
|
#define setup_thread_stack(new,old) do { } while(0)
|
||||||
|
|
||||||
static inline unsigned long *end_of_stack(const struct task_struct *task)
|
static __always_inline unsigned long *end_of_stack(const struct task_struct *task)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_STACK_GROWSUP
|
#ifdef CONFIG_STACK_GROWSUP
|
||||||
return (unsigned long *)((unsigned long)task->stack + THREAD_SIZE) - 1;
|
return (unsigned long *)((unsigned long)task->stack + THREAD_SIZE) - 1;
|
||||||
|
|
Loading…
Reference in a new issue