virtio_balloon: Fix memory leaks on errors in virtballoon_probe()
authorDavid Hildenbrand <david@redhat.com>
Wed, 5 Feb 2020 16:34:01 +0000 (17:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:47 +0000 (04:35 -0800)
commitc6d07f6e50e47d439fd25fa0ae5382588636c38b
tree44e18d1bcdc282253c1511c031d64adf82a312e8
parent3ac13462f55add67754cee52e3e9bffde040894d
virtio_balloon: Fix memory leaks on errors in virtballoon_probe()

commit 1ad6f58ea9364b0a5d8ae06249653ac9304a8578 upstream.

We forget to put the inode and unmount the kernfs used for compaction.

Fixes: 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker")
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Liang Li <liang.z.li@intel.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20200205163402.42627-3-david@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virtio/virtio_balloon.c