All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] fs/ntfs3: Fix error code in indx_add_allocate()
@ 2021-08-24  7:49 Dan Carpenter
  2021-08-24  7:50 ` [PATCH 2/3] fs/ntfs3: Potential NULL dereference in hdr_find_split() Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dan Carpenter @ 2021-08-24  7:49 UTC (permalink / raw)
  To: Konstantin Komarov; +Cc: ntfs3, linux-kernel, kernel-janitors

Return -EINVAL if ni_find_attr() fails.  Don't return success.

Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 fs/ntfs3/index.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 6aa9540ece47..07d6dee0a4ba 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1499,6 +1499,7 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni,
 	alloc = ni_find_attr(ni, NULL, NULL, ATTR_ALLOC, in->name, in->name_len,
 			     NULL, &mi);
 	if (!alloc) {
+		err = -EINVAL;
 		if (bmp)
 			goto out2;
 		goto out1;
-- 
2.20.1


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

end of thread, other threads:[~2021-08-27 17:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  7:49 [PATCH 1/3] fs/ntfs3: Fix error code in indx_add_allocate() Dan Carpenter
2021-08-24  7:50 ` [PATCH 2/3] fs/ntfs3: Potential NULL dereference in hdr_find_split() Dan Carpenter
2021-08-24  9:35   ` Kari Argillander
2021-08-24  7:51 ` [PATCH 3/3] fs/ntfs3: Fix error handling in indx_insert_into_root() Dan Carpenter
2021-08-24 10:22   ` Kari Argillander
2021-08-27 17:47   ` Konstantin Komarov
2021-08-24  9:03 ` [PATCH 1/3] fs/ntfs3: Fix error code in indx_add_allocate() Kari Argillander

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.