From: Christian Borntraeger Date: Thu, 21 Jan 2010 11:19:07 +0000 (+0100) Subject: KVM: S390: fix potential array overrun in intercept handling X-Git-Tag: v2.6.33-rc6~24^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=062d5e9b0d714f449b261bb522eadaaf6f00f438;p=pandora-kernel.git KVM: S390: fix potential array overrun in intercept handling kvm_handle_sie_intercept uses a jump table to get the intercept handler for a SIE intercept. Static code analysis revealed a potential problem: the intercept_funcs jump table was defined to contain (0x48 >> 2) entries, but we only checked for code > 0x48 which would cause an off-by-one array overflow if code == 0x48. Use the compiler and ARRAY_SIZE to automatically set the limits. Cc: stable@kernel.org Signed-off-by: Christian Borntraeger Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed