]> git.ipfire.org Git - thirdparty/linux.git/commit
LoongArch: Fix arch_dup_task_struct() for CONFIG_RANDSTRUCT
authorHuacai Chen <chenhuacai@loongson.cn>
Sat, 6 Dec 2025 02:39:48 +0000 (10:39 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 6 Dec 2025 02:39:48 +0000 (10:39 +0800)
commita91b446e359aa96cc2655318789fd37441337415
treee283dbc2f63d12cb95f4c5a33222c17e26b729e6
parent3c250aecef62da81deb38ac6738ac0a88d91f1fc
LoongArch: Fix arch_dup_task_struct() for CONFIG_RANDSTRUCT

Now the optimized version of arch_dup_task_struct() for LoongArch
assumes 'thread' is the last member of 'task_struct'. But this is
not true if CONFIG_RANDSTRUCT is enabled after Linux-6.16.

So fix the arch_dup_task_struct() function for CONFIG_RANDSTRUCT by
copying the whole 'task_struct'.

Cc: stable@vger.kernel.org # 6.16+
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/process.c