[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_omZOmmwpN-iOxn@gmail.com>
Date: Sat, 12 Apr 2025 10:37:56 +0200
From: Ingo Molnar <mingo@...nel.org>
To: "Chang S. Bae" <chang.seok.bae@...el.com>
Cc: linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...capital.net>,
Dave Hansen <dave@...1.net>, Brian Gerst <brgerst@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>, "H . Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 6/8] x86/fpu: Make sure x86_task_fpu() doesn't get called
for PF_KTHREAD|PF_USER_WORKER tasks during exit
* Chang S. Bae <chang.seok.bae@...el.com> wrote:
> On 4/9/2025 2:11 PM, Ingo Molnar wrote:
> > void arch_release_task_struct(struct task_struct *tsk)
> > {
> > - if (fpu_state_size_dynamic())
> > + if (fpu_state_size_dynamic() && !(current->flags & (PF_KTHREAD | PF_USER_WORKER)))
> > fpstate_free(x86_task_fpu(tsk));
> > }
>
> Looks like the AMX system couldn't boot properly, and I found that
> referencing tsk->flags here resolves the issue.
Indeed, fixed!
I've also added your Fixed-by tag to the patch:
Fixed-by: Chang S. Bae <chang.seok.bae@...el.com>
Thanks,
Ingo
==========>
arch/x86/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index de9df37c5d67..7a1bfb61d86f 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -109,7 +109,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
#ifdef CONFIG_X86_64
void arch_release_task_struct(struct task_struct *tsk)
{
- if (fpu_state_size_dynamic() && !(current->flags & (PF_KTHREAD | PF_USER_WORKER)))
+ if (fpu_state_size_dynamic() && !(tsk->flags & (PF_KTHREAD | PF_USER_WORKER)))
fpstate_free(x86_task_fpu(tsk));
}
#endif
Powered by blists - more mailing lists