[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200615155645.32939-1-her0gyugyu@gmail.com>
Date: Mon, 15 Jun 2020 08:56:45 -0700
From: youngjun <her0gyugyu@...il.com>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: linux-unionfs@...r.kernel.org, linux-kernel@...r.kernel.org,
youngjun <her0gyugyu@...il.com>
Subject: [PATCH] ovl: inode reference leak in "ovl_is_inuse" true case.
When "ovl_is_inuse" true case, trap inode reference not put.
Signed-off-by: youngjun <her0gyugyu@...il.com>
---
fs/overlayfs/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 91476bc422f9..8837fc1ec3be 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1499,8 +1499,10 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs,
if (ovl_is_inuse(stack[i].dentry)) {
err = ovl_report_in_use(ofs, "lowerdir");
- if (err)
+ if (err) {
+ iput(trap);
goto out;
+ }
}
mnt = clone_private_mount(&stack[i]);
--
2.17.1
Powered by blists - more mailing lists