summaryrefslogtreecommitdiff
path: root/lib/lockref.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-10-27 09:43:52 +0100
committerPeter Zijlstra <peterz@infradead.org>2025-11-03 15:26:10 +0100
commit43cc54d8dbe6b761bd2672bf9bb46e5290e90277 (patch)
tree7fc1ea87eaeda3f2431b1f86be831008398c0055 /lib/lockref.c
parent0988ea18c6244da3dc35cfc0ad621531d0e1508a (diff)
s390/uaccess: Use unsafe wrappers for ASM GOTO
ASM GOTO is miscompiled by GCC when it is used inside a auto cleanup scope: bool foo(u32 __user *p, u32 val) { scoped_guard(pagefault) unsafe_put_user(val, p, efault); return true; efault: return false; } It ends up leaking the pagefault disable counter in the fault path. clang at least fails the build. S390 is not affected for unsafe_*_user() as it uses its own local label already, but __get/put_kernel_nofault() lack that. Rename them to arch_*_kernel_nofault() which makes the generic uaccess header wrap it with a local label that makes both compilers emit correct code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Link: https://patch.msgid.link/20251027083745.483079889@linutronix.de
Diffstat (limited to 'lib/lockref.c')
0 files changed, 0 insertions, 0 deletions