um: Use correct data source in fpregs_legacy_set()
authorTiwei Bie <tiwei.btw@antgroup.com>
Fri, 6 Jun 2025 12:44:28 +0000 (20:44 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Jun 2025 07:26:33 +0000 (09:26 +0200)
Read from the buffer pointed to by 'from' instead of '&buf', as
'buf' contains no valid data when 'ubuf' is NULL.

Fixes: b1e1bd2e6943 ("um: Add helper functions to get/set state for SECCOMP")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250606124428.148164-5-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/x86/um/ptrace.c

index 3275870330fe915e9d0322bf2bbc4f0883c62a4d..fae8aabad10f5b3785bdfb8270e5edfd1ae0d78e 100644 (file)
@@ -161,7 +161,7 @@ static int fpregs_legacy_set(struct task_struct *target,
                from = kbuf;
        }
 
-       return um_fxsr_from_i387(fxsave, &buf);
+       return um_fxsr_from_i387(fxsave, from);
 }
 #endif