Commit 62500d1f authored by Richard Purdie's avatar Richard Purdie Committed by Russell King

[ARM] 3292/1: Fix memory corruption in asm-arm/checksum.h: ip_fast_csum()

Patch from Richard Purdie

ip_fast_csum() accesses memory via a pointer (iph) within an
asm function. To prevent memory corruption when the function is
inlined, it needs "memory" on the clobber list.

This fixes ip checksum errors reported by a Zaurus user.
Signed-off-by: default avatarRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent afe5df20
...@@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl) ...@@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl)
mov %0, %0, lsr #16" mov %0, %0, lsr #16"
: "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
: "1" (iph), "2" (ihl) : "1" (iph), "2" (ihl)
: "cc"); : "cc", "memory");
return sum; return sum;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment