Skip to content

Commit

Permalink
[ARM] 3292/1: Fix memory corruption in asm-arm/checksum.h: ip_fast_cs…
Browse files Browse the repository at this point in the history
…um()

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>
  • Loading branch information
Richard Purdie authored and Russell King committed Feb 1, 2006
1 parent afe5df2 commit 62500d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-arm/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 62500d1

Please sign in to comment.