vmw_balloon: fix inflation with batching
authorNadav Amit <namit@vmware.com>
Tue, 3 Jul 2018 02:27:13 +0000 (19:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2018 09:39:25 +0000 (11:39 +0200)
commit1e39eb1bb1c07b6c46f8d8b712095b182bdfcc87
treee52ae81f4d156c48df7e0e2a8dde5e9fbd85a207
parent33b9257a64fe16277422062bd6ba2a090e78dbcf
vmw_balloon: fix inflation with batching

commit 90d72ce079791399ac255c75728f3c9e747b093d upstream.

Embarrassingly, the recent fix introduced worse problem than it solved,
causing the balloon not to inflate. The VM informed the hypervisor that
the pages for lock/unlock are sitting in the wrong address, as it used
the page that is used the uninitialized page variable.

Fixes: b23220fe054e9 ("vmw_balloon: fixing double free when batching mode is off")
Cc: stable@vger.kernel.org
Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_balloon.c