diff options
| author | Aurelien Jarno <[email protected]> | 2025-07-24 22:08:52 +0000 |
|---|---|---|
| committer | Paul Walmsley <[email protected]> | 2025-09-05 21:30:48 +0000 |
| commit | 1046791390af6703a5e24718a16f37974adb11db (patch) | |
| tree | 92cdfff23d82fea6b090dd767ad910ed63c415a8 /scripts/lib/kdoc/kdoc_item.py | |
| parent | riscv: use lw when reading int cpu in new_vmalloc_check (diff) | |
| download | kernel-1046791390af6703a5e24718a16f37974adb11db.tar.gz kernel-1046791390af6703a5e24718a16f37974adb11db.zip | |
riscv: uaccess: fix __put_user_nocheck for unaligned accesses
The type of the value to write should be determined by the size of the
destination, not by the value itself, which may be a constant. This
aligns the behavior with x86_64, where __typeof__(*(__gu_ptr)) is used
to infer the correct type.
This fixes an issue in put_cmsg, which was only writing 4 out of 8
bytes to the cmsg_len field, causing the glibc tst-socket-timestamp test
to fail.
Fixes: ca1a66cdd685 ("riscv: uaccess: do not do misaligned accesses in get/put_user()")
Signed-off-by: Aurelien Jarno <[email protected]>
Reviewed-by: Alexandre Ghiti <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paul Walmsley <[email protected]>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_item.py')
0 files changed, 0 insertions, 0 deletions
