All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20260225012400.858957687@linuxfoundation.org>

diff --git a/a/1.txt b/N1/1.txt
index b74056b..b6fd12e 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,45 +1,57 @@
-6.19-stable review patch.  If anyone has any objections, please let me know.
+6.18-stable review patch.  If anyone has any objections, please let me know.
 
 ------------------
 
-From: Li Nan <linan122@huawei.com>
+From: Aboorva Devarajan <aboorvad@linux.ibm.com>
 
-[ Upstream commit 99582edb3f62e8ee6c34512021368f53f9b091f2 ]
+[ Upstream commit e5c9ffc6ae1bcdb1062527d611043681ac301aca ]
 
-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.
+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.
 
-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 <linan122@huawei.com>
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Yu Kuai <yukuai@fnnas.com>
+[   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 <aboorvad@linux.ibm.com>
+Reviewed-by: Christian Loehle <christian.loehle@arm.com>
+Link: https://patch.msgid.link/20260216185005.1131593-2-aboorvad@linux.ibm.com
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- 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;
+ 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);
+ }
  
- 				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
diff --git a/a/content_digest b/N1/content_digest
index f765a48..5f78a6c 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,60 +1,72 @@
- "ref\020260225012359.695468795@linuxfoundation.org\0"
+ "ref\020260225012348.915798704@linuxfoundation.org\0"
  "From\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>\0"
- "Subject\0[PATCH 6.19 047/781] md/raid10: fix any_working flag handling in raid10_sync_request\0"
- "Date\0Tue, 24 Feb 2026 17:12:36 -0800\0"
+ "Subject\0[PATCH 6.18 509/641] cpuidle: Skip governor when only one idle state is available\0"
+ "Date\0Tue, 24 Feb 2026 17:23:55 -0800\0"
  "To\0stable@vger.kernel.org\0"
  "Cc\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
   patches@lists.linux.dev
-  Li Nan <linan122@huawei.com>
-  Yu Kuai <yukuai3@huawei.com>
-  Yu Kuai <yukuai@fnnas.com>
+  Aboorva Devarajan <aboorvad@linux.ibm.com>
+  Christian Loehle <christian.loehle@arm.com>
+  Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  " Sasha Levin <sashal@kernel.org>\0"
  "\00:1\0"
  "b\0"
- "6.19-stable review patch.  If anyone has any objections, please let me know.\n"
+ "6.18-stable review patch.  If anyone has any objections, please let me know.\n"
  "\n"
  "------------------\n"
  "\n"
- "From: Li Nan <linan122@huawei.com>\n"
+ "From: Aboorva Devarajan <aboorvad@linux.ibm.com>\n"
  "\n"
- "[ Upstream commit 99582edb3f62e8ee6c34512021368f53f9b091f2 ]\n"
+ "[ Upstream commit e5c9ffc6ae1bcdb1062527d611043681ac301aca ]\n"
  "\n"
- "In raid10_sync_request(), 'any_working' indicates if any IO will\n"
- "be submitted. When there's only one In_sync disk with badblocks,\n"
- "'any_working' might be set to 1 but no IO is submitted. Fix it by\n"
- "setting 'any_working' after badblock checks.\n"
+ "On certain platforms (PowerNV systems without a power-mgt DT node),\n"
+ "cpuidle may register only a single idle state. In cases where that\n"
+ "single state is a polling state (state 0), the ladder governor may\n"
+ "incorrectly treat state 1 as the first usable state and pass an\n"
+ "out-of-bounds index. This can lead to a NULL enter callback being\n"
+ "invoked, ultimately resulting in a system crash.\n"
  "\n"
- "Link: https://lore.kernel.org/linux-raid/20260105110300.1442509-11-linan666@huaweicloud.com\n"
- "Fixes: e875ecea266a (\"md/raid10 record bad blocks as needed during recovery.\")\n"
- "Signed-off-by: Li Nan <linan122@huawei.com>\n"
- "Reviewed-by: Yu Kuai <yukuai3@huawei.com>\n"
- "Signed-off-by: Yu Kuai <yukuai@fnnas.com>\n"
+ "[   13.342636] cpuidle-powernv : Only Snooze is available\n"
+ "[   13.351854] Faulting instruction address: 0x00000000\n"
+ "[   13.376489] NIP [0000000000000000] 0x0\n"
+ "[   13.378351] LR  [c000000001e01974] cpuidle_enter_state+0x2c4/0x668\n"
+ "\n"
+ "Fix this by adding a bail-out in cpuidle_select() that returns state 0\n"
+ "directly when state_count <= 1, bypassing the governor and keeping the\n"
+ "tick running.\n"
+ "\n"
+ "Fixes: dc2251bf98c6 (\"cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol\")\n"
+ "Signed-off-by: Aboorva Devarajan <aboorvad@linux.ibm.com>\n"
+ "Reviewed-by: Christian Loehle <christian.loehle@arm.com>\n"
+ "Link: https://patch.msgid.link/20260216185005.1131593-2-aboorvad@linux.ibm.com\n"
+ "Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>\n"
  "Signed-off-by: Sasha Levin <sashal@kernel.org>\n"
  "---\n"
- " drivers/md/raid10.c | 2 +-\n"
- " 1 file changed, 1 insertion(+), 1 deletion(-)\n"
- "\n"
- "diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c\n"
- "index 84be4cc7e8739..3a591e60a1449 100644\n"
- "--- a/drivers/md/raid10.c\n"
- "+++ b/drivers/md/raid10.c\n"
- "@@ -3402,7 +3402,6 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,\n"
- " \t\t\t\t    !test_bit(In_sync, &rdev->flags))\n"
- " \t\t\t\t\tcontinue;\n"
- " \t\t\t\t/* This is where we read from */\n"
- "-\t\t\t\tany_working = 1;\n"
- " \t\t\t\tsector = r10_bio->devs[j].addr;\n"
+ " drivers/cpuidle/cpuidle.c | 10 ++++++++++\n"
+ " 1 file changed, 10 insertions(+)\n"
+ "\n"
+ "diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c\n"
+ "index 56132e843c991..8950796a493de 100644\n"
+ "--- a/drivers/cpuidle/cpuidle.c\n"
+ "+++ b/drivers/cpuidle/cpuidle.c\n"
+ "@@ -357,6 +357,16 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *dev,\n"
+ " int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,\n"
+ " \t\t   bool *stop_tick)\n"
+ " {\n"
+ "+\t/*\n"
+ "+\t * If there is only a single idle state (or none), there is nothing\n"
+ "+\t * meaningful for the governor to choose. Skip the governor and\n"
+ "+\t * always use state 0 with the tick running.\n"
+ "+\t */\n"
+ "+\tif (drv->state_count <= 1) {\n"
+ "+\t\t*stop_tick = false;\n"
+ "+\t\treturn 0;\n"
+ "+\t}\n"
+ "+\n"
+ " \treturn cpuidle_curr_governor->select(drv, dev, stop_tick);\n"
+ " }\n"
  " \n"
- " \t\t\t\tif (is_badblock(rdev, sector, max_sync,\n"
- "@@ -3417,6 +3416,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,\n"
- " \t\t\t\t\t\tcontinue;\n"
- " \t\t\t\t\t}\n"
- " \t\t\t\t}\n"
- "+\t\t\t\tany_working = 1;\n"
- " \t\t\t\tbio = r10_bio->devs[0].bio;\n"
- " \t\t\t\tbio->bi_next = biolist;\n"
- " \t\t\t\tbiolist = bio;\n"
  "-- \n"
  2.51.0
 
-111974d4e0b97ea528154ed5910e2a8e75221a07feda1d2b432e0c2c5010e94f
+60786b23ddbc51449c3fdb14f82c77d0efcd2581583c5d44949fcaf8aad7cd4f

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.