Skip to contentSkip to conversation

FAILED: patch "[PATCH] ipmi:ssif: NULL thread on error" failed to apply to 6.6-stable tree

PATCH New [email protected] 2 participants 3 messages May 15

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x a8aebe93a4938c0ca1941eeaae821738f869be3d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051540-path-mulled-0e19@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a8aebe93a4938c0ca1941eeaae821738f869be3d Mon Sep 17 00:00:00 2001
From: Corey Minyard <[email protected]>
Date: Tue, 21 Apr 2026 06:50:22 -0500
Subject: [PATCH] ipmi:ssif: NULL thread on error

Cleanup code was checking the thread for NULL, but it was possibly a PTR_ERR() in one spot.

Spotted with static analysis.

Fixes 75c486cb1bca ("ipmi:ssif: Clean up kthread on errors")
Cc <[email protected]> # 91eb7ec72612: ipmi:ssif: Remove unnecessary indention
drivers/char/ipmi/ipmi_ssif.c +1 -0
index f3798f4e6a63..f419b46bf002 100644
@@ -1905,6 +1905,7 @@ static int ssif_probe(struct i2c_client *client)
 					"kssif%4.4x", thread_num);
 	if (IS_ERR(ssif_info->thread)) {
 		rv = PTR_ERR(ssif_info->thread);
+		ssif_info->thread = NULL;
 		dev_notice(&ssif_info->client->dev,
 			   "Could not start kernel thread: error %d\n",
 			   rv);
maintainer
#1 lore raw

PATCH 1/2 ipmi:ssif: Remove unnecessary indention

A section was in {} that didn't need to be, move the variable definition to the top and set th eindentino properly.

(cherry picked from commit 91eb7ec7261254b6875909df767185838598e21e)
---
 drivers/char/ipmi/ipmi_ssif.c | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)
drivers/char/ipmi/ipmi_ssif.c +12 -16
index df8dd50b4cbe..6ded3e51ff8b 100644
@@ -1650,6 +1650,7 @@ static int ssif_probe(struct i2c_client *client)
 	int               len = 0;
 	int               i;
 	u8		  slave_addr = 0;
+	unsigned int      thread_num;
 	struct ssif_addr_info *addr_info = NULL;
 
 	mutex_lock(&ssif_infos_mutex);
@@ -1858,22 +1859,17 @@ static int ssif_probe(struct i2c_client *client)
 	ssif_info->handlers.request_events = request_events;
 	ssif_info->handlers.set_need_watch = ssif_set_need_watch;
 
-	{
-		unsigned int thread_num;
-
-		thread_num = ((i2c_adapter_id(ssif_info->client->adapter)
-			       << 8) |
-			      ssif_info->client->addr);
-		init_completion(&ssif_info->wake_thread);
-		ssif_info->thread = kthread_run(ipmi_ssif_thread, ssif_info,
-					       "kssif%4.4x", thread_num);
-		if (IS_ERR(ssif_info->thread)) {
-			rv = PTR_ERR(ssif_info->thread);
-			dev_notice(&ssif_info->client->dev,
-				   "Could not start kernel thread: error %d\n",
-				   rv);
-			goto out;
-		}
+	thread_num = ((i2c_adapter_id(ssif_info->client->adapter) << 8) |
+		      ssif_info->client->addr);
+	init_completion(&ssif_info->wake_thread);
+	ssif_info->thread = kthread_run(ipmi_ssif_thread, ssif_info,
+					"kssif%4.4x", thread_num);
+	if (IS_ERR(ssif_info->thread)) {
+		rv = PTR_ERR(ssif_info->thread);
+		dev_notice(&ssif_info->client->dev,
+			   "Could not start kernel thread: error %d\n",
+			   rv);
+		goto out;
 	}
 
 	dev_set_drvdata(&ssif_info->client->dev, ssif_info);
Signature · 1 line
2.43.0
maintainer
#2 lore raw

PATCH 2/2 ipmi:ssif: NULL thread on error

Cleanup code was checking the thread for NULL, but it was possibly a PTR_ERR() in one spot.

Spotted with static analysis.

Fixes 75c486cb1bca ("ipmi:ssif: Clean up kthread on errors")
Cc <[email protected]> # 91eb7ec72612: ipmi:ssif: Remove unnecessary indention
(cherry picked from commit a8aebe93a4938c0ca1941eeaae821738f869be3d)
---
 drivers/char/ipmi/ipmi_ssif.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/ipmi/ipmi_ssif.c +1 -0
index 6ded3e51ff8b..fcb20e9589db 100644
@@ -1866,6 +1866,7 @@ static int ssif_probe(struct i2c_client *client)
 					"kssif%4.4x", thread_num);
 	if (IS_ERR(ssif_info->thread)) {
 		rv = PTR_ERR(ssif_info->thread);
+		ssif_info->thread = NULL;
 		dev_notice(&ssif_info->client->dev,
 			   "Could not start kernel thread: error %d\n",
 			   rv);
Signature · 1 line
2.43.0