Skip to contentSkip to conversation

fix bug in x86_64 csum_partial_copy_generic()

PATCH New Dave Peterson 1 participant 1 message Jul 29, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix bug in x86_64 csum_partial_copy_generic()

I was observing reproducible crashes on the "movw %bx,(%rsi)" instruction below while a process in a recvfrom() system call was copying packet data to user space. The patch below fixes the exception table and causes the crash to no longer reproduce. Please apply.

Thanks,
Dave Peterson
<[email protected]> <[email protected]>

arch/x86_64/lib/csum-copy.S +1 -1
diff -urNp -X dontdiff linux-2.6.12.3/arch/x86_64/lib/csum-copy.S linux-2.6.12.3-bugfix/arch/x86_64/lib/csum-copy.S
@@ -188,8 +188,8 @@ csum_partial_copy_generic:
 	source
 	movw (%rdi),%bx
 	adcl %ebx,%eax
-	dest
 	decl %ecx
+	dest
 	movw %bx,(%rsi)
 	leaq 2(%rdi),%rdi
 	leaq 2(%rsi),%rsi