From: Jeffrey Hugo <quic_jhugo@quicinc.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
<mhi@lists.linux.dev>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH 5/6] bus: mhi: ep: Move chan->lock to the start of processing queued ch ring
Date: Thu, 5 Jan 2023 08:56:02 -0700 [thread overview]
Message-ID: <40f16530-304e-3916-e5f2-7556e2e9b7dd@quicinc.com> (raw)
In-Reply-To: <20221228161704.255268-6-manivannan.sadhasivam@linaro.org>
On 12/28/2022 9:17 AM, Manivannan Sadhasivam wrote:
> There is a good chance that while the channel ring gets processed, the STOP
> or RESET command for the channel might be received from the MHI host. In
> those cases, the entire channel ring processing needs to be protected by
> chan->lock to prevent the race where the corresponding channel ring might
> be reset.
>
> While at it, let's also add a sanity check to make sure that the ring is
> started before processing it. Because, if the STOP/RESET command gets
> processed while mhi_ep_ch_ring_worker() waited for chan->lock, the ring
> would've been reset.
>
> Cc: <stable@vger.kernel.org> # 5.19
> Fixes: 03c0bb8ec983 ("bus: mhi: ep: Add support for processing channel rings")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
next prev parent reply other threads:[~2023-01-05 15:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 16:16 [PATCH 0/6] MHI EP fixes and improvements Manivannan Sadhasivam
2022-12-28 16:16 ` [PATCH 1/6] bus: mhi: ep: Power up/down MHI stack during MHI RESET Manivannan Sadhasivam
2023-01-05 4:09 ` Jeffrey Hugo
2022-12-28 16:17 ` [PATCH 2/6] bus: mhi: ep: Check if the channel is supported by the controller Manivannan Sadhasivam
2023-01-05 4:11 ` Jeffrey Hugo
2022-12-28 16:17 ` [PATCH 3/6] bus: mhi: ep: Only send -ENOTCONN status if client driver is available Manivannan Sadhasivam
2023-01-05 4:12 ` Jeffrey Hugo
2022-12-28 16:17 ` [PATCH 4/6] bus: mhi: ep: Fix the debug message for MHI_PKT_TYPE_RESET_CHAN_CMD cmd Manivannan Sadhasivam
2023-01-05 15:54 ` Jeffrey Hugo
2022-12-28 16:17 ` [PATCH 5/6] bus: mhi: ep: Move chan->lock to the start of processing queued ch ring Manivannan Sadhasivam
2023-01-05 15:56 ` Jeffrey Hugo [this message]
2022-12-28 16:17 ` [PATCH 6/6] bus: mhi: ep: Save channel state locally during suspend and resume Manivannan Sadhasivam
2023-01-05 15:57 ` Jeffrey Hugo
2023-01-23 7:23 ` [PATCH 0/6] MHI EP fixes and improvements Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40f16530-304e-3916-e5f2-7556e2e9b7dd@quicinc.com \
--to=quic_jhugo@quicinc.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mhi@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).