]> xenbits.xensource.com Git - xen.git/commit
x86/sysctl: don't clobber memory if NCAPINTS > ARRAY_SIZE(pi->hw_cap)
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 16 Sep 2015 09:22:00 +0000 (11:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 16 Sep 2015 09:22:00 +0000 (11:22 +0200)
commitc373b912e74659f0e0898ae93e89513694cfd94e
tree08842f72079998a439217954a045934556c2d686
parent92906abbee6d1dc975111a88d83cd3550f71e4c8
x86/sysctl: don't clobber memory if NCAPINTS > ARRAY_SIZE(pi->hw_cap)

There is no current problem, as both NCAPINTS and pi->hw_cap are 8 entries,
but the limit should be calculated appropriately so as to avoid hypervisor
stack corruption if the two do get out of sync.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/sysctl.c