Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933980AbdCJJTJ (ORCPT ); Fri, 10 Mar 2017 04:19:09 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37378 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933187AbdCJJTE (ORCPT ); Fri, 10 Mar 2017 04:19:04 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yisheng Xie , Minchan Kim , Rafael Aquini , Konstantin Khlebnikov , Gioh Kim , Vlastimil Babka , Michal Hocko , "Michael S. Tsirkin" , Jason Wang , Hanjun Guo , Xishi Qiu , Andrew Morton , Linus Torvalds Subject: [PATCH 4.9 046/153] mm balloon: umount balloon_mnt when removing vb device Date: Fri, 10 Mar 2017 10:07:59 +0100 Message-Id: <20170310083949.841423493@linuxfoundation.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170310083947.108106897@linuxfoundation.org> References: <20170310083947.108106897@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1644 Lines: 49 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yisheng Xie commit 9c57b5808c625f4fc93da330b932647eaff321f7 upstream. With CONFIG_BALLOON_COMPACTION=y the kernel will mount balloon_mnt for balloon page migration when we probe a virtio_balloon device. However we do not unmount it when removing the device. Fix this. Fixes: b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature") Link: http://lkml.kernel.org/r/1486531318-35189-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Acked-by: Minchan Kim Cc: Rafael Aquini Cc: Konstantin Khlebnikov Cc: Gioh Kim Cc: Vlastimil Babka Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Hanjun Guo Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- drivers/virtio/virtio_balloon.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -615,8 +615,12 @@ static void virtballoon_remove(struct vi cancel_work_sync(&vb->update_balloon_stats_work); remove_common(vb); +#ifdef CONFIG_BALLOON_COMPACTION if (vb->vb_dev_info.inode) iput(vb->vb_dev_info.inode); + + kern_unmount(balloon_mnt); +#endif kfree(vb); }