[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.16] x86/pv-shim: correctly ignore empty onlining requests
commit 08f6c88405a4406cac5b90e8d9873258dc445006 Author: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx> AuthorDate: Mon Oct 31 13:26:59 2022 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Oct 31 13:26:59 2022 +0100 x86/pv-shim: correctly ignore empty onlining requests Mem-op requests may have zero extents. Such requests need treating as no-ops. pv_shim_online_memory(), however, would have tried to take 2³²-1 order-sized pages from its balloon list (to then populate them), typically ending when the entire set of ballooned pages of this order was consumed. Note that pv_shim_offline_memory() does not have such an issue. Fixes: b2245acc60c3 ("xen/pvshim: memory hotplug") Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> master commit: 9272225ca72801fd9fa5b268a2d1c5adebd19cd9 master date: 2022-10-28 15:47:59 +0200 --- xen/arch/x86/pv/shim.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c index d9704121a7..4146ee3f9c 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -944,6 +944,9 @@ void pv_shim_online_memory(unsigned int nr, unsigned int order) struct page_info *page, *tmp; PAGE_LIST_HEAD(list); + if ( !nr ) + return; + spin_lock(&balloon_lock); page_list_for_each_safe ( page, tmp, &balloon ) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.16
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |