From: Nilay Shroff <nilay@linux.ibm.com>
To: Ming Lei <ming.lei@redhat.com>, Niklas Fischer <niklas@niklasfi.de>
Cc: linux-mm@kvack.org, linux-block@vger.kernel.org, vbabka@suse.cz,
akpm@linux-foundation.org, axboe@kernel.dk
Subject: Re: [BUG] Double-free in blk_mq_free_sched_tags() after commit f5a6604f7a44
Date: Sun, 28 Sep 2025 20:39:20 +0530 [thread overview]
Message-ID: <d9548c38-9e33-48c2-9ecc-b942a84dcfaa@linux.ibm.com> (raw)
In-Reply-To: <CAFj5m9K+ct=ioJUz8v78Wr_myC7pjVnB1SAKRXc-CLysHV_5ww@mail.gmail.com>
On 9/28/25 6:48 PM, Ming Lei wrote:
> On Sun, Sep 28, 2025 at 8:18 PM Niklas Fischer <niklas@niklasfi.de> wrote:
>>
>> Hello,
>>
>> I'm reporting a kernel crash that occurs during boot on systems with
>> multiple storage devices. The issue manifests as a double-free bug in
>> the SLUB allocator, triggered by block layer elevator switching code.
>>
>> === Problem Summary ===
>>
>> The system crashes during early boot when udev configures I/O schedulers
>> on multiple storage devices. The crash occurs in mm/slub.c with a
>> double-free detection, traced back to blk_mq_free_sched_tags().
>>
>> === Crash Details ===
>>
>> Multiple crashes occur during boot, showing a severe race condition.
>> Seven separate kernel oops/panics are observed:
>>
>> * Oops #1 (CPU 13, PID 928): General protection fault in
>> kfree+0x69/0x3b0 - corrupted address 0x14b9d856a995288
>> * Oops #2-4, #6-7 (multiple CPUs/PIDs): kernel BUG at mm/slub.c:546 in
>> __slab_free+0x111/0x2a0 - SLUB double-free detection
>> * Oops #5 (CPU 1, PID 952): General protection fault in kfree+0x69/0x3b0
>> - corrupted address 0x2480af562995288
>>
>> All crashes share the same call stack pattern:
>>
>> elv_iosched_store+0x149/0x180
>> elevator_change+0xdb/0x180
>> elevator_change_done+0x4a/0x1f0
>> blk_mq_free_sched_tags+0x34/0x70
>> blk_mq_free_tags+0x4b/0x60
>> kfree+0x334/0x3b0 <-- crash here
>>
>> === Bisection Results ===
>>
>> I bisected the issue to this commit:
>>
>> commit f5a6604f7a4405450e4a1f54e5430f47290c500f
>
> It should be solved by the following commit:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-6.18/block&id=ba28afbd9eff2a6370f23ef4e6a036ab0cfda409
>
> Thanks,
>
Oh, I hadn’t noticed this message before sending my previous email.
It’s quite possible that this could address the observed symptom, though
I didn’t see any traces of nr_request being modified in the provided
dmesg.txt. Nonetheless, this change could be a potential fix and may be
worth trying out in a custom kernel.
Thanks,
--Nilay
next prev parent reply other threads:[~2025-09-28 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 12:08 Niklas Fischer
2025-09-28 13:18 ` Ming Lei
2025-09-28 15:09 ` Nilay Shroff [this message]
2025-09-28 15:01 ` Nilay Shroff
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=d9548c38-9e33-48c2-9ecc-b942a84dcfaa@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ming.lei@redhat.com \
--cc=niklas@niklasfi.de \
--cc=vbabka@suse.cz \
/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