From: David Howells <dhowells@redhat.com>
To: Chang Yu <marcus.yu.56@gmail.com>
Cc: dhowells@redhat.com, jlayton@kernel.org, netfs@lists.linux.dev,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+af5c06208fa71bf31b16@syzkaller.appspotmail.com,
skhan@linuxfoundation.org
Subject: Re: [PATCH] netfs: Add a check for NULL folioq in netfs_writeback_unlock_folios
Date: Thu, 31 Oct 2024 14:06:24 +0000 [thread overview]
Message-ID: <45855.1730383584@warthog.procyon.org.uk> (raw)
In-Reply-To: <Zxw_UgtVWOHHfkoD@gmail.com>
Chang Yu <marcus.yu.56@gmail.com> wrote:
> I see. This might be a stupid question, but is it ever possible that we have
> exactly one folioq and at the same time
>
> slot >= folioq_nr_slots(folioq)
>
> is true? Then I imagine netfs_delete_buffer_head would return NULL and
> cause the bug to trigger as well?
Whilst it is possible for "slot >= folioq_nr_slots(folioq)" to be true on what
is currently the last folioq, wreq->cleaned_to suggests that there must be
still-locked folios in the queue:
unsigned long long clean_to = min(wreq->collected_to, wreq->contiguity);
if (wreq->cleaned_to < clean_to)
netfs_writeback_unlock_folios(wreq, clean_to, ¬es);
David
prev parent reply other threads:[~2024-10-31 14:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 4:40 [PATCH] netfs: Add a check for NULL folioq in netfs_writeback_unlock_folios Chang Yu
2024-10-25 8:05 ` David Howells
2024-10-26 1:01 ` Chang Yu
2024-10-31 14:06 ` David Howells [this message]
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=45855.1730383584@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcus.yu.56@gmail.com \
--cc=netfs@lists.linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+af5c06208fa71bf31b16@syzkaller.appspotmail.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 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.