linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ovl: inode reference leak in "ovl_is_inuse" true case.
@ 2020-06-15 15:56 youngjun
  2020-06-15 16:45 ` Amir Goldstein
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: youngjun @ 2020-06-15 15:56 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: linux-unionfs, linux-kernel, youngjun

When "ovl_is_inuse" true case, trap inode reference not put.

Signed-off-by: youngjun <her0gyugyu@gmail.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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-14 14:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 15:56 [PATCH] ovl: inode reference leak in "ovl_is_inuse" true case youngjun
2020-06-15 16:45 ` Amir Goldstein
2020-06-16  4:46 ` [PATCH] ovl: inode reference leak in ovl_is_inuse " youngjun
2020-06-16  5:33   ` Amir Goldstein
2020-06-16  6:57 ` [PATCH v3] " youngjun
2020-06-16  7:11   ` Amir Goldstein
2020-06-16  8:30 ` [PATCH 4/4] " youngjun
2020-07-14 14:40   ` Miklos Szeredi
2020-06-16  8:33 ` [PATCH v4] " youngjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).