[PATCH] arm64/ptrace: Don't clear calling process' TIF_SME on OOM

Will Deacon will at kernel.org
Tue Sep 6 09:27:15 PDT 2022


On Fri, Sep 02, 2022 at 02:28:02PM +0100, Mark Brown wrote:
> If allocating memory for the target SVE state in za_set() fails we clear
> TIF_SME for the ptracing task which is obviously not correct.  If we are
> here we know that the target task already had neither TIF_SVE nor
> TIF_SME set since we only need to allocate if either the target had not
> used either SVE or SME and had no need to allocate state before or we
> just changed the vector length with vec_set_vector_length() which clears
> TIF_ for us on allocation failure so just remove the clear entirely.
> 
> Reported-by: Wang ShaoBo <bobo.shaobowang at huawei.com>
> Signed-off-by: Mark Brown <broonie at kernel.org>
> ---
>  arch/arm64/kernel/ptrace.c | 2 --
>  1 file changed, 2 deletions(-)

Is this fixing a real (i.e. user-observable) issue, or is it removing some
redundant code? I'm afraid I can't tell from the commit message and I'm
trying to figure out whether we should be queueing it for -rc (and CC'ing
stable) or not.

Thanks,

Will



More information about the linux-arm-kernel mailing list