GIT: unionfs2-2.6.27.y: x86: fix csum_ipv6_magic asm memory clobber

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:08 EDT 2010


commit e965c3dcb699d946bf7faac5a6b0e3149ec66780
Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
Date:   Thu Oct 1 15:44:02 2009 -0700

    x86: fix csum_ipv6_magic asm memory clobber
    
    commit 392d814daf460a9564d29b2cebc51e1ea34e0504 upstream.
    
    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.
    
    This caused failures in Hurd's pfinetv4 when we tried to compile it with
    gcc-4.3 (bogus checksums).
    
    Signed-off-by: Samuel Thibault <samuel.thibault at ens-lyon.org>
    Cc: Ingo Molnar <mingo at elte.hu>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Cc: "H. Peter Anvin" <hpa at zytor.com>
    Acked-by: "David S. Miller" <davem at davemloft.net>
    Cc: Andi Kleen <andi at firstfloor.org>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

diff --git a/include/asm-x86/checksum_32.h b/include/asm-x86/checksum_32.h
index 52bbb0d..0fbf77e 100644
--- a/include/asm-x86/checksum_32.h
+++ b/include/asm-x86/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);
 }


More information about the unionfs-cvs mailing list