aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-02-01 14:26:00 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-02-01 14:26:00 -0500
commit62500d1f8eadff078cca462dc4df035a29180383 (patch)
tree774ad280d77841292b0fb7bd1fe6f99251aa38c2 /include
parentafe5df208e6ecd09b7d1acf36eb2cf945842bee5 (diff)
[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>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/checksum.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h
index d4256d5f3a7c..747bdd31a74b 100644
--- a/include/asm-arm/checksum.h
+++ b/include/asm-arm/checksum.h
@@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl)
77 mov %0, %0, lsr #16" 77 mov %0, %0, lsr #16"
78 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) 78 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
79 : "1" (iph), "2" (ihl) 79 : "1" (iph), "2" (ihl)
80 : "cc"); 80 : "cc", "memory");
81 return sum; 81 return sum;
82} 82}
83 83