Re: [syzbot] [ntfs3?] WARNING in indx_insert_into_buffer

From: syzbot
Date: Thu Nov 23 2023 - 20:12:25 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.

***

Subject: [ntfs3?] WARNING in indx_insert_into_buffer
Author: lizhi.xu@xxxxxxxxxxxxx

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 037266a5f723

diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index cf92b2433f7a..e6b59cb87769 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1905,6 +1905,8 @@ indx_insert_into_buffer(struct ntfs_index *indx, struct ntfs_inode *ni,
}

if (err) {
+ if (err == -ENOMEM || err == -EINVAL)
+ goto out;
/*
* Undo critical operations.
*/