Commit bc8b70fc authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] uml: fix critical IP checksum corruption

From: Lars Ellenberg <Lars.Ellenberg@linbit.com>

Add a memory barrier to the assembly checksum code - the code was copied
straight from the i386 one, and the patch resyncs the code with the
original.  I'll check if the original code can be included directly (i.e.
"#include") after 2.6.9.

Without this patch, every 2.6 UML release corrupts the checksum of every
UDP fragmented packet with size >= MTU (verified by various people, we all
agree on this issue; nobody reported "Works fine here").  The corrupted
packets are not accepted, thus blocking any kind of communication with
large-sized UDP packets.

In fact, I've even dissected the UML -> host traffic before and after this
patch with Ethereal - and it always reported an incorrect checksum for
fragmented UDP packets before and always correct after applying the patch.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5216d135
......@@ -103,7 +103,8 @@ static inline unsigned short ip_fast_csum(unsigned char * iph,
are modified, we must also specify them as outputs, or gcc
will assume they contain their original values. */
: "=r" (sum), "=r" (iph), "=r" (ihl)
: "1" (iph), "2" (ihl));
: "1" (iph), "2" (ihl)
: "memory");
return(sum);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment