mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
[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: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
afe5df208e
commit
62500d1f8e
@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl)
|
||||
mov %0, %0, lsr #16"
|
||||
: "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
|
||||
: "1" (iph), "2" (ihl)
|
||||
: "cc");
|
||||
: "cc", "memory");
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user