[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f376c90c-513d-0148-7bd2-9aae2151fd2d@codeaurora.org>
Date: Wed, 21 Feb 2018 11:39:45 -0800
From: Chris Lew <clew@...eaurora.org>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Ohad Ben-Cohen <ohad@...ery.com>,
Arun Kumar Neelakantam <aneela@...eaurora.org>,
Srini Kandagatla <srinivas.kandagatla@...aro.org>
Cc: linux-remoteproc@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rpmsg: glink: Use spinlock in tx path
Hey Bjorn,
Minor issue with the glink patch.
Thanks,
Chris
On 2/13/2018 11:04 AM, Bjorn Andersson wrote:
[..]
> @@ -288,15 +288,14 @@ static int qcom_glink_tx(struct qcom_glink *glink,
> const void *data, size_t dlen, bool wait)
> {
> unsigned int tlen = hlen + dlen;
> + unsigned long flags;
> int ret;
>
> /* Reject packets that are too big */
> if (tlen >= glink->tx_pipe->length)
> return -EINVAL;
>
> - ret = mutex_lock_interruptible(&glink->tx_lock);
> - if (ret)
> - return ret;
> + spin_lock_irqsave(&glink->tx_lock, flags);
>
qcom_glink_tx will return an uninitialized ret value with removal of
mutex_lock_interruptible.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists