[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190814164028.GC54611@arrakis.emea.arm.com>
Date: Wed, 14 Aug 2019 17:40:28 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Mark Rutland <mark.rutland@....com>
Cc: linux-kernel@...r.kernel.org, ak@...ux.intel.com,
akpm@...ux-foundation.org, bigeasy@...utronix.de, bp@...e.de,
davem@...emloft.net, hch@....de, kan.liang@...el.com,
mingo@...nel.org, peterz@...radead.org, riel@...riel.com,
will@...nel.org
Subject: Re: [PATCH 5/9] arm64: correctly check for ktrheads
On Wed, Aug 14, 2019 at 11:41:27AM +0100, Mark Rutland wrote:
> Since commit:
>
> 6eb6c80187c55b7f ("arm64: kernel thread don't need to save fpsimd context.")
>
> ... we skip saving the fpsimd state for kernel threads in
> arch_dup_task_struct(). We determine whether current is a kthread by
> looking at current->mm.
>
> In general, a non-NULL current->mm doesn't imply that current is a
> kthread, as kthreads can install an mm via use_mm(), and so it's
> preferable to use is_kthread() to determine whether a thread is a
> kthread.
>
> For consistency, let's use is_kthread() here.
>
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Will Deacon <will@...nel.org>
Acked-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists