From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.23 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796207584; b=QZu2YCXGoRHjwm0G/0wCXvUwvSA97oFA0rfekYz70zZkUrJB/F/vigS3/E95c+Pt4uYA nsyHiUTKBIILoe8EFAqUxKz4K0DGgrSTiXPdmpVOrsI12r1Y3vz6mVKoOhxPZLL3Zq2s+ RumL4BDWgTIEZv5+j5KPWCWf91ts+5lwauJl5UWJDppSl6wYpIDZR+MurS4uUbikX5ryy xVRjR/Z12THVDsYltdeObzPK7Yq9NQ/FDLE7Ej2P9BB/lPQH3nkiBC4948/aX01kPcHJX aGeEiL3ISwkoH2Hg5ay5jfFNKlLFN7IR5kRPDqzYEpUQlVhlXN6eX5A8IbAICN4K3sg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796207584; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=MNpPldhannw+BEUuziFmOdaTTrITCJIH+cA/lr7Nl14=; b=US8BqyVuNAX9kpVFlb38HtyF4HompSezgPGlDDGec8ThmZVWGdXmHYXa1yTSniqBo6K/ ZVlzM2U83UGCKUaipj9L4J22yxpFOGr0CkMUua/O3yGSscy7AorqZ+Xe+g9oCUlGnROpM 7m8UG7lfzbLVpUizfhUIEJE5pCNXJxw/4/fiaciDagI7xiYJVjWxEQ1n7/m9F20BYqWrD Txgc7djLsqVTbthcmqQsbna1PySeZ1EIeKJRrUUwTHQYO6LuxKRl3AG58ynDGdTnZZCFx nTilBsEJZT0aE6byGN44EqWNvrdkQGc8QzMlS3HXSlHsqMt8gnOR0m/kUl1jGsR/pJA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=d94kjxOh; arc=none smtp.remote-ip=91.218.175.23 Received: from mta0.migadu.com (out-23.mta0.migadu.com [91.218.175.23]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1D8606A31A for ; Wed, 2 Dec 2026 10:33:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD1D8606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=d94kjxOh X-Envelope-To: linux-raid@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=Dr6rGUc1UOX66+tCTGh+/5cib5xqiRAJLGvlmtdbtps=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796207580; v=1; x=1796812380; b=d94kjxOhanRF53TvsQpVgLVar7wCetLP20L4RplaC51X5FzHmSnrvivLz5z6HNwGK/WghcQs 0Mou0IyH1nvLEkY1hCPG+bDLEr7sCSHGAQPHSJoDPwGX561gDGsJJGLanGBPKEsPLdDflSFE7hC b2UtwSYn6z71KSN16l5yKC58= X-Envelope-To: linux-raid@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id f94f4352d214dc83; Wed, 02 Dec 2026 10:33:00 +0000 X-Mizu-Trace-ID: f94f4352d214dc83 X-Migadu-Flow: FLOW_OUT Message-ID: <8a328f18-1735-4114-924a-73ccda4d1aa0@linux.dev> Date: Wed, 2 Dec 2026 18:32:52 +0800 X-Mailing-List: linux-raid@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: panic for md ddf (14disks/raid6) on kernel 6.6.161 but not on kernel 6.12.115 To: Wang Yugui , linux-raid@vger.kernel.org, "stable@vger.kernel.org" , Song Liu , yukuai@fygo.io, magiclinan@didiglobal.com, xiao@kernel.org, dannyshih@synology.com References: <20261109080740.EF23.409509F4@e16-tech.com> From: Jiayuan Chen In-Reply-To: <20261109080740.EF23.409509F4@e16-tech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: > > 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?