From: Ming Lei <ming.lei@redhat.com>
To: 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, nilay@linux.ibm.com
Subject: Re: [BUG] Double-free in blk_mq_free_sched_tags() after commit f5a6604f7a44
Date: Sun, 28 Sep 2025 21:18:19 +0800 [thread overview]
Message-ID: <CAFj5m9K+ct=ioJUz8v78Wr_myC7pjVnB1SAKRXc-CLysHV_5ww@mail.gmail.com> (raw)
In-Reply-To: <37087b24-24f7-46a9-95c4-2a2f3dced09b@niklasfi.de>
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,
next prev parent reply other threads:[~2025-09-28 13:18 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 [this message]
2025-09-28 15:09 ` Nilay Shroff
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='CAFj5m9K+ct=ioJUz8v78Wr_myC7pjVnB1SAKRXc-CLysHV_5ww@mail.gmail.com' \
--to=ming.lei@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=niklas@niklasfi.de \
--cc=nilay@linux.ibm.com \
--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