[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ecqb3qd0.fsf@jogness.linutronix.de>
Date: Thu, 06 Nov 2025 20:42:43 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Joanne Koong <joannelkoong@...il.com>, syzbot
<syzbot+3686758660f980b402dc@...kaller.appspotmail.com>,
"amurray@...goodpenguin.co.uk" <amurray@...goodpenguin.co.uk>,
brauner@...nel.org, chao@...nel.org, djwong@...nel.org,
jaegeuk@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [iomap?] kernel BUG in folio_end_read (2)
On 2025-11-06, John Ogness <john.ogness@...utronix.de> wrote:
>> I think that we should do the following:
>>
>> diff --git a/kernel/printk/printk_ringbuffer.c b/kernel/printk/printk_ringbuffer.c
>> index 839f504db6d3..78e02711872e 100644
>> --- a/kernel/printk/printk_ringbuffer.c
>> +++ b/kernel/printk/printk_ringbuffer.c
>> @@ -1260,9 +1260,8 @@ static const char *get_data(struct prb_data_ring *data_ring,
>> return NULL;
>> }
>>
>> - /* Regular data block: @begin less than @next and in same wrap. */
>> - if (!is_blk_wrapped(data_ring, blk_lpos->begin, blk_lpos->next) &&
>> - blk_lpos->begin < blk_lpos->next) {
>> + /* Regular data block: @begin and @next in same wrap. */
>> + if (!is_blk_wrapped(data_ring, blk_lpos->begin, blk_lpos->next)) {
>> db = to_block(data_ring, blk_lpos->begin);
>> *data_size = blk_lpos->next - blk_lpos->begin;
Upon further consideration, your suggestion here is better. The wrapping
data block detection should continue to make sure there is exactly one 1
wrap. The size check will not catch the case where there are multiple
wraps.
John
Powered by blists - more mailing lists