diff options
| author | 2025-03-19 08:58:07 +0100 | |
|---|---|---|
| committer | 2025-03-19 08:58:07 +0100 | |
| commit | 1a7c3068143be177deea86d977d3042a0c256706 (patch) | |
| tree | 82eef5ceb0f3cc15a6cdf617ca4511db3af73e21 /arch/um/kernel/process.c | |
| parent | ALSA: usb-audio: Fix CME quirk for UF series keyboards (diff) | |
| parent | ALSA: hda/realtek: Support mute LED on HP Laptop 15s-du3xxx (diff) | |
| download | wireguard-linux-1a7c3068143be177deea86d977d3042a0c256706.tar.xz wireguard-linux-1a7c3068143be177deea86d977d3042a0c256706.zip | |
Merge branch 'for-linus' into for-next
Back-merge of 6.14 devel branch for further developments of TAS
codecsBack-merge of 6.14 devel branch for further developments.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
| -rw-r--r-- | arch/um/kernel/process.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index e5a2d4d897e0..0cd6fad3d908 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -191,7 +191,15 @@ void initial_thread_cb(void (*proc)(void *), void *arg) int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) { - memcpy(dst, src, arch_task_struct_size); + /* init_task is not dynamically sized (missing FPU state) */ + if (unlikely(src == &init_task)) { + memcpy(dst, src, sizeof(init_task)); + memset((void *)dst + sizeof(init_task), 0, + arch_task_struct_size - sizeof(init_task)); + } else { + memcpy(dst, src, arch_task_struct_size); + } + return 0; } |
