From: Alex Williamson Date: Thu, 29 Nov 2012 21:07:59 +0000 (-0700) Subject: KVM: Fix user memslot overlap check X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~27^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5419369ed6bd4cf711fdda5e52a5999b940413f5;p=pandora-kernel.git KVM: Fix user memslot overlap check Prior to memory slot sorting this loop compared all of the user memory slots for overlap with new entries. With memory slot sorting, we're just checking some number of entries in the array that may or may not be user slots. Instead, walk all the slots with kvm_for_each_memslot, which has the added benefit of terminating early when we hit the first empty slot, and skip comparison to private slots. Cc: stable@vger.kernel.org Signed-off-by: Alex Williamson Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed