From: Russell King Date: Mon, 26 Jul 2010 11:18:16 +0000 (+0100) Subject: ARM: Fix csum_partial_copy_from_user() X-Git-Tag: firefly_0821_release~9833^2~1330^2~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4609a179c97ae60fef173547a9bbb214359808ce;p=firefly-linux-kernel-4.4.55.git ARM: Fix csum_partial_copy_from_user() Using the parent functions frame pointer to access our arguments is completely wrong, whether or not we're building with frame pointers or not. What we should be using is the stack pointer to get at the word above the registers we stacked ourselves. Reported-by: Bosko Radivojevic Tested-by: Bosko Radivojevic Signed-off-by: Russell King --- diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S index 59ff6fdc1e63..7d08b43d2c0e 100644 --- a/arch/arm/lib/csumpartialcopyuser.S +++ b/arch/arm/lib/csumpartialcopyuser.S @@ -71,7 +71,7 @@ .pushsection .fixup,"ax" .align 4 9001: mov r4, #-EFAULT - ldr r5, [fp, #4] @ *err_ptr + ldr r5, [sp, #8*4] @ *err_ptr str r4, [r5] ldmia sp, {r1, r2} @ retrieve dst, len add r2, r2, r1