From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D8BE21D596; Wed, 25 Feb 2026 01:27:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771982860; cv=none; b=ralBOunDRW9pgwdbYTPQUAJPUvMW9C5+jpLsOMdgHW8ZiRR8r5sq0pW4ZkuIbyobLc5hSpnTmBbIx/Ta1iqy9bw3OSyhkYYytAmu6qZFuhHxkJ1rSIB52LgXrIXXxMdepUipaKVkquEenLNx2OiEUtPgu9Y4PB5yMHhyHN4Pdfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771982860; c=relaxed/simple; bh=fEhckbrIp1xiFp7nNdR1TzrCWWep88Lf+1ab/Iu9RII=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SgVql9YeBzqndMnMmooGcmHvFkjQ04Bz/j2fho2yrBjpZ04dEZCM4SOBQTONTGVAf7MJMSbdb5kjrsK4NTgKNGXk5xZfysTajxfd/CmovJCJ8XAHRv6BmFE3X4oCrftAx1mjkI95baZ1sjyoS/5pdUfAMABphP7n7Nv1zFjZstU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=U57NtN2W; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="U57NtN2W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22EBAC116D0; Wed, 25 Feb 2026 01:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1771982860; bh=fEhckbrIp1xiFp7nNdR1TzrCWWep88Lf+1ab/Iu9RII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U57NtN2WRPjn9/Bo9tx0tnbeuG5xGA5CVpYQw2H1fFwbWDrWw4b+Kt550ZNTPF4e8 6U29XYvodTPBCjyYAjSwx0w0hx0rr320bEbkWzDdXBjjlBinfdwTvTWI/G0eKE9ddu UhfpEVmv8XbHfIH68BBPawOIMX/iFLDNNNLVc0Qo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Li Nan , Yu Kuai , Yu Kuai , Sasha Levin Subject: [PATCH 6.19 047/781] md/raid10: fix any_working flag handling in raid10_sync_request Date: Tue, 24 Feb 2026 17:12:36 -0800 Message-ID: <20260225012400.858957687@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012359.695468795@linuxfoundation.org> References: <20260225012359.695468795@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Li Nan [ Upstream commit 99582edb3f62e8ee6c34512021368f53f9b091f2 ] In raid10_sync_request(), 'any_working' indicates if any IO will be submitted. When there's only one In_sync disk with badblocks, 'any_working' might be set to 1 but no IO is submitted. Fix it by setting 'any_working' after badblock checks. Link: https://lore.kernel.org/linux-raid/20260105110300.1442509-11-linan666@huaweicloud.com Fixes: e875ecea266a ("md/raid10 record bad blocks as needed during recovery.") Signed-off-by: Li Nan Reviewed-by: Yu Kuai Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin --- drivers/md/raid10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 84be4cc7e8739..3a591e60a1449 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3402,7 +3402,6 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr, !test_bit(In_sync, &rdev->flags)) continue; /* This is where we read from */ - any_working = 1; sector = r10_bio->devs[j].addr; if (is_badblock(rdev, sector, max_sync, @@ -3417,6 +3416,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr, continue; } } + any_working = 1; bio = r10_bio->devs[0].bio; bio->bi_next = biolist; biolist = bio; -- 2.51.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8769230E855; Wed, 25 Feb 2026 06:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772002708; cv=none; b=HbgNKZH996mYoGUqY5FUPm9vMXdLxZdICDXVJ+bQgbvm6ORybS+4nY4KpBT+XOTUNH+muJ51jCuFjwee5bXUU068JlDI8WHja0g3dGNv9qnyfum5LSGa8OCwFhuwwt9QK+wLdW9KhQ1oQVKJwBLHIg3dmXP0bWRqcoRPZyO891M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772002708; c=relaxed/simple; bh=XnsbEzyKI+ZDxhwR3IraOGN3FPULirJxZ8q/vFaJ/vY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CeoZul0oGwwhMBq/XW5f9U80H3Cp0dgvkx36WCxOV9ZawJO/XBJruc63DXPHcORk/2+7u2S3hHYswSKXTnzw6vrPYuwnteLLY3+cF57cG9U9iA52l51UPW6l+xzNJusHCKd52UHN76B0EdiwH7eKkYDdk8AWdcC5Gn5zYgeOMT0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l/pO1rBS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="l/pO1rBS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60E28C116D0; Wed, 25 Feb 2026 06:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772002708; bh=XnsbEzyKI+ZDxhwR3IraOGN3FPULirJxZ8q/vFaJ/vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l/pO1rBSIbgEagKdrKELO34VxNz8a5RIu618uH20HPyovKDznK5eYjGBU58GfG9A2 PwcWbD+6zCvmTQ3Q9lnslB8j+/VleVwOfQ/KXMShmB+P+aaPg7V7cIRaO42xONTyRO Tck2389OblgOIgUnu8dB1ZPqGpVrWBobAKFIggLw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aboorva Devarajan , Christian Loehle , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 6.18 509/641] cpuidle: Skip governor when only one idle state is available Date: Tue, 24 Feb 2026 17:23:55 -0800 Message-ID: <20260225012400.858957687@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012348.915798704@linuxfoundation.org> References: <20260225012348.915798704@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: <20260225012355.YHhrI928UUScP9sU-Cx30O_NJYFYPF1ElJ_K-KrXzU8@z> 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aboorva Devarajan [ Upstream commit e5c9ffc6ae1bcdb1062527d611043681ac301aca ] On certain platforms (PowerNV systems without a power-mgt DT node), cpuidle may register only a single idle state. In cases where that single state is a polling state (state 0), the ladder governor may incorrectly treat state 1 as the first usable state and pass an out-of-bounds index. This can lead to a NULL enter callback being invoked, ultimately resulting in a system crash. [ 13.342636] cpuidle-powernv : Only Snooze is available [ 13.351854] Faulting instruction address: 0x00000000 [ 13.376489] NIP [0000000000000000] 0x0 [ 13.378351] LR [c000000001e01974] cpuidle_enter_state+0x2c4/0x668 Fix this by adding a bail-out in cpuidle_select() that returns state 0 directly when state_count <= 1, bypassing the governor and keeping the tick running. Fixes: dc2251bf98c6 ("cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol") Signed-off-by: Aboorva Devarajan Reviewed-by: Christian Loehle Link: https://patch.msgid.link/20260216185005.1131593-2-aboorvad@linux.ibm.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/cpuidle/cpuidle.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 56132e843c991..8950796a493de 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -357,6 +357,16 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *dev, int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, bool *stop_tick) { + /* + * If there is only a single idle state (or none), there is nothing + * meaningful for the governor to choose. Skip the governor and + * always use state 0 with the tick running. + */ + if (drv->state_count <= 1) { + *stop_tick = false; + return 0; + } + return cpuidle_curr_governor->select(drv, dev, stop_tick); } -- 2.51.0