From: Jiayuan Chen <jiayuan.chen@linux.dev>
To: Wang Yugui <wangyugui@e16-tech.com>,
linux-raid@vger.kernel.org,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Song Liu <song@kernel.org>,
yukuai@fygo.io, magiclinan@didiglobal.com, xiao@kernel.org,
dannyshih@synology.com
Subject: Re: panic for md ddf (14disks/raid6) on kernel 6.6.161 but not on kernel 6.12.115
Date: Wed, 2 Dec 2026 18:32:52 +0800 [thread overview]
Message-ID: <8a328f18-1735-4114-924a-73ccda4d1aa0@linux.dev> (raw)
In-Reply-To: <20261109080740.EF23.409509F4@e16-tech.com>
On 11/9/26 8:07 AM, Wang Yugui wrote:
> Hi,
>
> I noticed a panic for md ddf(14disks/raid6) on kernel 6.6.161,
> but not happen on kernel 6.12.115.
>
> Call Trace:
> <TASK>
> percpu_ref_kill_and_confirm+0x39/0xc0
> __mddev_suspend+0x5c/0x1e0
> ? __kmem_cache_alloc_node+0x1bb/0x320
> ? _kstrtoull+0x3b/0x90
> raid_disks_store+0x4a/0x190
> md_attr_store+0x84/0x100
> kernfs_fop_write_iter+0x13b/0x1d0
> vfs_write+0x2bf/0x3e0
> ksys_write+0x63/0xe0
> do_syscall_64+0x62/0x90
>
> Do we need some backuport for kernel 6.6.y?
> any advice please.
>
> Best Regards
> Wang Yugui (wangyugui@e16-tech.com)
> 2026/11/09
+Cc stable
Anyone noticed it?
I'm not an expert on md, but we hit the same panic on 6.6.160, at boot,
on a box with Intel VROC (IMSM):
# mdadm --detail-platform
Platform : Intel(R) Virtual RAID on CPU
Version : 9.0.0.1240
RAID Levels : raid0 raid1 raid10 raid5
I/O Controller : /sys/devices/pci0000:1f/0000:1f:17.0 (SATA)
Port7 : /dev/sdb
Port6 : /dev/sda
# cat /proc/mdstat
md126 : active raid1 sdb[1] sda[0]
937687040 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sda[1](S) sdb[0](S)
10402 blocks super external:imsm
The array uses external metadata, same as your ddf case. For such
arrays mdadm writes raid_disks via sysfs before the array is running.
Since 1362a246c12a6 ("md: suspend array while updating raid_disks via
sysfs"), that write goes into:
raid_disks_store()
mddev_suspend_and_lock()
__mddev_suspend()
percpu_ref_kill(&mddev->active_io) <-- panic
In 6.6.y active_io is initialized here, which has not run yet:
md_run()
percpu_ref_init(&mddev->active_io, ...)
Mainline (and 6.12.y) does not panic because active_io is initialized
when the mddev is allocated:
mddev_init()
percpu_ref_init(&mddev->active_io, ...)
Is 1362a246c12a6 suitable for 6.6.y? Or am I missing something?
prev parent reply other threads:[~2026-12-02 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 0:07 panic for md ddf (14disks/raid6) on kernel 6.6.161 but not on kernel 6.12.115 Wang Yugui
2026-12-02 10:32 ` Jiayuan Chen [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=8a328f18-1735-4114-924a-73ccda4d1aa0@linux.dev \
--to=jiayuan.chen@linux.dev \
--cc=dannyshih@synology.com \
--cc=linux-raid@vger.kernel.org \
--cc=magiclinan@didiglobal.com \
--cc=song@kernel.org \
--cc=stable@vger.kernel.org \
--cc=wangyugui@e16-tech.com \
--cc=xiao@kernel.org \
--cc=yukuai@fygo.io \
/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.