From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
Cc: linux-rdma@vger.kernel.org
Subject: [PATCH 4/4] qibfs: fix _another_ leak
Date: Thu, 13 Mar 2025 04:30:20 +0000 [thread overview]
Message-ID: <20250313043020.GD2123707@ZenIV> (raw)
In-Reply-To: <20250313042702.GU2023217@ZenIV>
failure to allocate inode => leaked dentry...
this one had been there since the initial merge; to be fair,
if we are that far OOM, the odds of failing at that particular
allocation are low...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
drivers/infiniband/hw/qib/qib_fs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index b27791029fa9..b9f4a2937c3a 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -55,6 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
struct inode *inode = new_inode(dir->i_sb);
if (!inode) {
+ dput(dentry);
error = -EPERM;
goto bail;
}
--
2.39.5
next prev parent reply other threads:[~2025-03-13 4:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 4:27 [PATCHES] several fixes from tree-in-dcache stuff Al Viro
2025-03-13 4:28 ` [PATCH 1/4] spufs: fix a leak on spufs_new_file() failure Al Viro
2025-03-13 8:26 ` Christian Brauner
2025-03-13 4:29 ` [PATCH 2/4] spufs: fix gang directory lifetimes Al Viro
2025-03-13 8:28 ` Christian Brauner
2025-03-13 4:29 ` [PATCH 3/4] spufs: fix a leak in spufs_create_context() Al Viro
2025-03-13 8:28 ` Christian Brauner
2025-03-13 4:30 ` Al Viro [this message]
2025-03-13 8:29 ` [PATCH 4/4] qibfs: fix _another_ leak Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250313043020.GD2123707@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.