From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+512459401510e2a9a39f@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [ext4?] INFO: task hung in filename_rmdir
Date: Sun, 1 Mar 2026 16:35:20 +0800 [thread overview]
Message-ID: <tencent_91CA52F0866D49AF2ECD6EFE8CB9A7CF0606@qq.com> (raw)
In-Reply-To: <69a1a0eb.050a0220.3a55be.0021.GAE@google.com>
#syz test
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 293f698b7042..4b72da4d646f 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2425,6 +2425,8 @@ struct ext4_dir_entry_2 {
char name[EXT4_NAME_LEN]; /* File name */
};
+#define DIFF_AREA_DE_XH sizeof(struct ext4_dir_entry_2)
+
/*
* Access the hashes at the end of ext4_dir_entry_2
*/
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 7bf9ba19a89d..313c460a93c5 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2160,7 +2160,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
error = -EIO;
goto getblk_failed;
}
- memcpy(new_bh->b_data, s->base, new_bh->b_size);
+ memcpy(new_bh->b_data + DIFF_AREA_DE_XH, s->base, new_bh->b_size);
ext4_xattr_block_csum_set(inode, new_bh);
set_buffer_uptodate(new_bh);
unlock_buffer(new_bh);
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h
index 1fedf44d4fb6..4a28023c72e8 100644
--- a/fs/ext4/xattr.h
+++ b/fs/ext4/xattr.h
@@ -8,6 +8,7 @@
*/
#include <linux/xattr.h>
+#include "ext4.h"
/* Magic value in attribute blocks */
#define EXT4_XATTR_MAGIC 0xEA020000
@@ -90,7 +91,7 @@ struct ext4_xattr_entry {
#define EXT4_XATTR_MIN_LARGE_EA_SIZE(b) \
((b) - EXT4_XATTR_LEN(3) - sizeof(struct ext4_xattr_header) - 4)
-#define BHDR(bh) ((struct ext4_xattr_header *)((bh)->b_data))
+#define BHDR(bh) ((struct ext4_xattr_header *)((bh)->b_data + DIFF_AREA_DE_XH))
#define ENTRY(ptr) ((struct ext4_xattr_entry *)(ptr))
#define BFIRST(bh) ENTRY(BHDR(bh)+1)
#define IS_LAST_ENTRY(entry) (*(__u32 *)(entry) == 0)
next prev parent reply other threads:[~2026-03-01 8:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 13:49 syzbot
2026-02-28 8:29 ` Qing Wang
2026-02-28 9:02 ` syzbot
2026-02-28 9:44 ` Qing Wang
2026-03-01 8:35 ` Edward Adam Davis [this message]
2026-03-01 9:09 ` syzbot
2026-03-05 4:51 ` Edward Adam Davis
2026-03-05 5:33 ` syzbot
2026-03-05 6:35 ` Edward Adam Davis
2026-03-05 7:08 ` syzbot
2026-03-05 12:21 ` Edward Adam Davis
2026-03-05 14:11 ` syzbot
2026-03-06 1:18 ` Edward Adam Davis
2026-03-06 2:20 ` syzbot
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=tencent_91CA52F0866D49AF2ECD6EFE8CB9A7CF0606@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+512459401510e2a9a39f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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 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®