From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0BF6B4D5A1; Sat, 12 Sep 2026 07:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789198568; cv=none; b=HinKRyUCYfkbhpeOJm49C27MLmFr5rfuvI7sQfZUNWf54CX8bQ/ohtWuugMkx4iR3do9ySvYjEz4OA0drEgB89CWhSb218o7QS6vxqviNRDolQvYAH1GgbTe9SINg0rKGTpiNgG99tCE0jj8nds0fLRN09kjeA9fn64RSf73GxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789198568; c=relaxed/simple; bh=c1H1lljABnFwz/ooGqcjjqrpiBGHP/gwI5gyJnBsskw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JxVX/neaJuryPhseKL4xi+/+pKaNjmTj1GC961jnhp9wtqWDoVzYQjWE0pwzdXYX0zpRYWBIHOBSZ4X93Q3HMq4xKRoApJxzNRmUZjYlGQ29XED8/Aamt5HXjGJ1Vl8fLLavPY9kR5SWdLeoH2FYqKgzF7+8btP0Ml+og0EcUc4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EDZCvTST; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EDZCvTST" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D25EB1F000FF; Sat, 12 Sep 2026 07:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789198566; bh=4UqVk5xE/BRrzD0bp8ByJIzwQevFdJcNGzc3min6JOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EDZCvTSTjAB/T/OZscVd3iURkRZMXQcsJnC9IvEE5v7OB6bogRIWgqzGADV6gsCvk QwfNy+hnv1g56+ro9fqGqG+EFEMfCmrUMaz+yezZb0LM7V+XN8StMkNujM0dCoSUpC vl8aGqHjiKNR3i/9hYp4+cNFwjOVjTURKoJx7kZI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Sudeep Holla , Sasha Levin Subject: [PATCH 7.2 0405/1815] firmware: arm_scmi: Unwind TX receiver mailbox setup failure Date: Sat, 12 Sep 2026 08:35:55 +0200 Message-ID: <20260912065658.402389189@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sudeep Holla [ Upstream commit 6f7c06744d53dc8e047725d411d7f915d9ec35ae ] mailbox_chan_setup() can request an additional unidirectional TX receiver channel after successfully acquiring the primary channel. If that second request fails, the function returns immediately and leaves the primary channel allocated. Unwind the primary mailbox channel before returning the error so probe deferral or other setup failures do not leave the channel busy for later probe attempts. Fixes: 9f68ff79ec2c ("firmware: arm_scmi: Add support for unidirectional mailbox channels") Reported-by: Sashiko Link: https://patch.msgid.link/20260714-scmi_core_fixes-v6-13-3afe499d46e3@kernel.org Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin --- drivers/firmware/arm_scmi/transports/mailbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/transports/mailbox.c b/drivers/firmware/arm_scmi/transports/mailbox.c index b6459fbb81513..37e3eab529eaf 100644 --- a/drivers/firmware/arm_scmi/transports/mailbox.c +++ b/drivers/firmware/arm_scmi/transports/mailbox.c @@ -230,9 +230,10 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, smbox->chan_receiver = mbox_request_channel(cl, a2p_rx_chan); if (IS_ERR(smbox->chan_receiver)) { ret = PTR_ERR(smbox->chan_receiver); + smbox->chan_receiver = NULL; if (ret != -EPROBE_DEFER) dev_err(cdev, "failed to request SCMI Tx Receiver mailbox\n"); - return ret; + goto err_free_chan; } } @@ -248,6 +249,8 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, return 0; +err_free_chan: + mbox_free_channel(smbox->chan); err_clear_cinfo: cinfo->transport_info = NULL; smbox->cinfo = NULL; -- 2.53.0