From: bugzilla-daemon--- via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [Bug 220575] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Date: Thu, 25 Sep 2025 09:23:41 +0000 [thread overview]
Message-ID: <bug-220575-202145-RXV6CJpORu@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-220575-202145@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=220575
--- Comment #11 from Chao Yu (chao@kernel.org) ---
(In reply to JY from comment #8)
> OK, I will try it.
>
> At the last experiment, I used the newly added '_private' to record non-null
> value and dump it when fscrypt_is_bounce_page(page) is true.
>
> + pr_crit("bounced_page:0xpx, pp:0x%px,
> fscrypt_pagecache_page(page):0x%px\n", page, page->_private,
> fscrypt_pagecache_page(page));
>
> The result is :
> bounced_page:0xfffffffe82282290, pp:0x0000000000000000,
> fscrypt_pagecache_page(page):0x0000000000000000
> (pp is page->_private)
>
> I think the 'pp:0x0000000000000000' proves this page is not a bounce_page.
> Am I misunderstanding? :(
Can you please try below diff?
---
fs/f2fs/data.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 1b0050b8421d..13bde4a2f40d 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -884,6 +884,15 @@ void f2fs_submit_merged_ipu_write(struct f2fs_sb_info
*sbi,
}
}
+#define sanity_check_page(sbi, enc_page, page) \
+ do { \
+ if (page && !page->private) { \
+ dump_page(enc_page, "dump enc_page"); \
+ dump_page(page, "dump data page"); \
+ BUG_ON(1); \
+ } \
+ } while (0)
+
int f2fs_merge_page_bio(struct f2fs_io_info *fio)
{
struct bio *bio = *fio->bio;
@@ -896,9 +905,13 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio)
trace_f2fs_submit_page_bio(page, fio);
+ sanity_check_page(fio->sbi, fio->encrypted_page, fio->page);
+
if (bio && !page_is_mergeable(fio->sbi, bio, *fio->last_block,
fio->new_blkaddr))
f2fs_submit_merged_ipu_write(fio->sbi, &bio, NULL);
+
+ sanity_check_page(fio->sbi, fio->encrypted_page, fio->page);
alloc_new:
if (!bio) {
bio = __bio_alloc(fio, BIO_MAX_VECS);
@@ -906,15 +919,19 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio)
page_folio(fio->page)->index, fio, GFP_NOIO);
add_bio_entry(fio->sbi, bio, page, fio->temp);
+ sanity_check_page(fio->sbi, fio->encrypted_page, fio->page);
} else {
if (add_ipu_page(fio, &bio, page))
goto alloc_new;
+ sanity_check_page(fio->sbi, fio->encrypted_page, fio->page);
}
if (fio->io_wbc)
wbc_account_cgroup_owner(fio->io_wbc, page_folio(fio->page),
PAGE_SIZE);
+ sanity_check_page(fio->sbi, fio->encrypted_page, fio->page);
+
inc_page_count(fio->sbi, WB_DATA_TYPE(page, false));
*fio->last_block = fio->new_blkaddr;
--
2.40.1
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2025-09-25 9:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 3:33 [f2fs-dev] [Bug 220575] New: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 bugzilla-daemon--- via Linux-f2fs-devel
2025-09-15 12:27 ` [f2fs-dev] [Bug 220575] " bugzilla-daemon--- via Linux-f2fs-devel
2025-09-16 2:19 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-16 2:52 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-24 6:50 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-24 8:47 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-24 9:51 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-24 13:22 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-25 3:38 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-25 3:41 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-25 8:40 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-25 9:23 ` bugzilla-daemon--- via Linux-f2fs-devel [this message]
2025-09-28 10:30 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-28 13:55 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-09-30 10:45 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-10-01 7:51 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-10-01 8:01 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-10-03 2:33 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-10-03 2:44 ` bugzilla-daemon--- via Linux-f2fs-devel
2025-10-03 3:13 ` bugzilla-daemon--- via Linux-f2fs-devel
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=bug-220575-202145-RXV6CJpORu@https.bugzilla.kernel.org/ \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=bugzilla-daemon@kernel.org \
/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 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.