Linux kernel -stable discussions
 help / color / mirror / Atom feed
* Re: panic for md ddf (14disks/raid6) on kernel 6.6.161 but not on kernel 6.12.115
       [not found] <20261109080740.EF23.409509F4@e16-tech.com>
@ 2026-12-02 10:32 ` Jiayuan Chen
  0 siblings, 0 replies; only message in thread
From: Jiayuan Chen @ 2026-12-02 10:32 UTC (permalink / raw)
  To: Wang Yugui, linux-raid, stable@vger.kernel.org, Song Liu, yukuai,
	magiclinan, xiao, dannyshih



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?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-02 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261109080740.EF23.409509F4@e16-tech.com>
2026-12-02 10:32 ` panic for md ddf (14disks/raid6) on kernel 6.6.161 but not on kernel 6.12.115 Jiayuan Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox