From: Eric Sesterhenn / Snakebyte Date: Mon, 9 Apr 2007 14:15:05 +0000 (+0200) Subject: KVM: Fix overflow bug in overflow detection code X-Git-Tag: v2.6.22-rc1~1008^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3964994bb5ba85a3d8b54ae618f7be1cecce916d;p=pandora-kernel.git KVM: Fix overflow bug in overflow detection code The expression sp - 6 < sp where sp is a u16 is undefined in C since 'sp - 6' is promoted to int, and signed overflow is undefined in C. gcc 4.2 actually warns about it. Replace with a simpler test. Signed-off-by: Eric Sesterhenn Signed-off-by: Avi Kivity --- Reading git-diff-tree failed