]> git.baikalelectronics.ru Git - kernel.git/commit
xen/balloon: fix cancelled balloon action
authorJuergen Gross <jgross@suse.com>
Tue, 5 Oct 2021 13:34:33 +0000 (15:34 +0200)
committerJuergen Gross <jgross@suse.com>
Wed, 6 Oct 2021 05:45:00 +0000 (07:45 +0200)
commitecab415aee4263f5344eaebed901fc3b5167776f
tree8d38777d006804051d157f800ee1844813286b2b
parentf9621fa4e6f48dfc50c0644f4e79aa9865ccc3b6
xen/balloon: fix cancelled balloon action

In case a ballooning action is cancelled the new kernel thread handling
the ballooning might end up in a busy loop.

Fix that by handling the cancelled action gracefully.

While at it introduce a short wait for the BP_WAIT case.

Cc: stable@vger.kernel.org
Fixes: afc278ca79eca7 ("xen/balloon: use a kernel thread instead a workqueue")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20211005133433.32008-1-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/balloon.c