[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0000000000002d53a1060af1c1b3@google.com>
Date: Fri, 24 Nov 2023 19:35:04 -0800
From: syzbot <syzbot+c5b339d16ffa61fd512d@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] [ntfs3?] WARNING in indx_insert_into_buffer
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: [ntfs3?] WARNING in indx_insert_into_buffer
Author: eadavis@...com
please test WARNING in indx_insert_into_buffer
#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..67c27e6ce497 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1816,6 +1816,9 @@ indx_insert_into_buffer(struct ntfs_index *indx, struct ntfs_inode *ni,
* - Insert sp into parent buffer (or root)
* - Make sp a parent for new buffer
*/
+ printk("l: %d, u1: %d, t: %d, do: %d\n",
+ level, le32_to_cpu(hdr1->used), le32_to_cpu(hdr1->total),
+ le32_to_cpu(hdr1->de_off));
sp = hdr_find_split(hdr1);
if (!sp)
return -EINVAL;
@@ -1833,6 +1836,8 @@ indx_insert_into_buffer(struct ntfs_index *indx, struct ntfs_inode *ni,
goto out;
}
+ printk("l: %d, u1: %d, sps: %d, t: %d, do: %d\n",
+ level, used1, sp_size, le32_to_cpu(hdr1->total), le32_to_cpu(hdr1->de_off));
if (!hdr1->flags) {
up_e->flags |= NTFS_IE_HAS_SUBNODES;
up_e->size = cpu_to_le16(sp_size + sizeof(u64));
@@ -1895,6 +1900,10 @@ indx_insert_into_buffer(struct ntfs_index *indx, struct ntfs_inode *ni,
if (!level) {
/* Insert in root. */
err = indx_insert_into_root(indx, ni, up_e, NULL, ctx, fnd, 0);
+ printk("%d, u1: %d, sps: %d, t: %d, do: %d\n",
+ level, used1, sp_size, le32_to_cpu(hdr1->total), le32_to_cpu(hdr1->de_off));
+ if (err == -ENOMEM)
+ goto out;
} else {
/*
* The target buffer's parent is another index buffer.
Powered by blists - more mailing lists