public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber
@ 2009-09-26 19:27 Samuel Thibault
  2009-09-30 22:40 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2009-09-26 19:27 UTC (permalink / raw)
  To: linux-kernel

Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
memory clobber, as it is only passed the address of the buffer, not a
memory reference to the buffer itself.

Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable@kernel.org

diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h
index 7c5ef8b..46fc474 100644
--- a/arch/x86/include/asm/checksum_32.h
+++ b/arch/x86/include/asm/checksum_32.h
@@ -161,7 +161,8 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
 	    "adcl $0, %0	;\n"
 	    : "=&r" (sum)
 	    : "r" (saddr), "r" (daddr),
-	      "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
+	      "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)
+	    : "memory");
 
 	return csum_fold(sum);
 }

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-30 23:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-26 19:27 [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber Samuel Thibault
2009-09-30 22:40 ` Andrew Morton
2009-09-30 22:45   ` H. Peter Anvin
2009-09-30 23:01     ` Samuel Thibault
2009-09-30 23:19       ` Andrew Morton
2009-09-30 23:22         ` David Miller
2009-09-30 23:45           ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox