From: Mark Tinguely <mark.tinguely@oracle.com>
To: syzbot <syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com>,
jlbec@evilplan.org, joseph.qi@linux.alibaba.com,
linux-kernel@vger.kernel.org, mark@fasheh.com,
ocfs2-devel@lists.linux.dev, syzkaller-bugs@googlegroups.com
Subject: Re: [External] : [syzbot] [ocfs2?] BUG: unable to handle kernel paging request in ocfs2_unlock_and_free_folios
Date: Mon, 16 Jun 2025 09:39:38 -0500 [thread overview]
Message-ID: <93f61af8-64a4-4993-b003-7f0b94bc5573@oracle.com> (raw)
In-Reply-To: <b92b26e0-e6d9-49e2-b46f-b855831a86fc@oracle.com>
> The reproducer uses FAULT_INJECTION to make memory allocation fail, which
> causes __filemap_get_folio() to fail, when initializing w_folios[i] in
> ocfs2_grab_folios_for_write(), it only returns an error code and the
value
> of w_folios[i] is the error code, which causes
ocfs2_unlock_and_free_folios()
> to recycle the invalid w_folios[i] when releasing folios.
>
> Reported-by: syzbot+c2ea94ae47cd7e3881ec@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=c2ea94ae47cd7e3881ec
> Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
> ---
> fs/ocfs2/aops.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
> index 40b6bce12951..89aadc6cdd87 100644
> --- a/fs/ocfs2/aops.c
> +++ b/fs/ocfs2/aops.c
> @@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct
address_space *mapping,
> if (IS_ERR(wc->w_folios[i])) {
> ret = PTR_ERR(wc->w_folios[i]);
> mlog_errno(ret);
> + wc->w_folios[i] = NULL;
> goto out;
> }
> }
> --
> 2.43.0
sorry for the cut and paste reply. My email system rejected and bounced
the original email.
ACKed-by: Mark Tinguely <mark.tinguely@oracle.com>
next prev parent reply other threads:[~2025-06-16 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-15 17:07 syzbot
2025-06-15 19:20 ` [External] : " Mark Tinguely
2025-06-16 14:39 ` Mark Tinguely [this message]
2025-06-16 1:31 ` [PATCH] ocfs2: reset folio to NULL when get folio fails Lizhi Xu
2025-06-17 3:45 ` Joseph Qi
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=93f61af8-64a4-4993-b003-7f0b94bc5573@oracle.com \
--to=mark.tinguely@oracle.com \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=syzbot+c2ea94ae47cd7e3881ec@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®