From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] rpmsg: glink: Use spinlock in tx path References: <20180213190404.25026-1-bjorn.andersson@linaro.org> From: Chris Lew Message-ID: Date: Wed, 21 Feb 2018 11:39:45 -0800 MIME-Version: 1.0 In-Reply-To: <20180213190404.25026-1-bjorn.andersson@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit To: Bjorn Andersson , Ohad Ben-Cohen , Arun Kumar Neelakantam , Srini Kandagatla Cc: linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org List-ID: 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