mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.13 1/8] qibfs: fix _another_ leak
@ 2025-04-07 18:16 Sasha Levin
  2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 2/8] ntb: reduce stack usage in idt_scan_mws Sasha Levin
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sasha Levin @ 2025-04-07 18:16 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Al Viro, Sasha Levin, dennis.dalessandro, linux-rdma

From: Al Viro <viro@zeniv.linux.org.uk>

[ Upstream commit bdb43af4fdb39f844ede401bdb1258f67a580a27 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 b27791029fa93..b9f4a2937c3ac 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


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

end of thread, other threads:[~2025-04-07 18:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-07 18:16 [PATCH AUTOSEL 6.13 1/8] qibfs: fix _another_ leak Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 2/8] ntb: reduce stack usage in idt_scan_mws Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 3/8] ntb_hw_amd: Add NTB PCI ID for new gen CPU Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 4/8] 9p/net: fix improper handling of bogus negative read/write replies Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 5/8] 9p/trans_fd: mark concurrent read and writes to p9_conn->err Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 6/8] rtc: pcf85063: do a SW reset if POR failed Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 7/8] tracing: Enforce the persistent ring buffer to be page aligned Sasha Levin
2025-04-07 18:16 ` [PATCH AUTOSEL 6.13 8/8] io_uring: always do atomic put from iowq Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®