public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	linux-remoteproc@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] rpmsg: smd: Fix double unlock in __qcom_smd_send()
Date: Fri, 19 Jan 2018 15:08:00 +0000	[thread overview]
Message-ID: <20180119150800.GB887@minitux> (raw)
In-Reply-To: <20180119132236.GA32641@mwanda>

On Fri 19 Jan 05:22 PST 2018, Dan Carpenter wrote:

> We're not holding the lock here, so we shouldn't unlock.
> 
> Fixes: 178f3f75bb4e ("rpmsg: smd: Don't hold the tx lock during wait")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 

Thanks Dan!

Regards,
Bjorn

> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> index cea9a0930c4d..dd3e7eea8c38 100644
> --- a/drivers/rpmsg/qcom_smd.c
> +++ b/drivers/rpmsg/qcom_smd.c
> @@ -759,11 +759,11 @@ static int __qcom_smd_send(struct qcom_smd_channel *channel, const void *data,
>  				       qcom_smd_get_tx_avail(channel) >= tlen ||
>  				       channel->state != SMD_CHANNEL_OPENED);
>  		if (ret)
> -			goto out;
> +			goto ret;
>  
>  		ret = mutex_lock_interruptible(&channel->tx_lock);
>  		if (ret)
> -			goto out;
> +			return ret;
>  
>  		SET_TX_CHANNEL_FLAG(channel, fBLOCKREADINTR, 1);
>  	}

      reply	other threads:[~2018-01-19 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 13:22 [PATCH] rpmsg: smd: Fix double unlock in __qcom_smd_send() Dan Carpenter
2018-01-19 15:08 ` Bjorn Andersson [this message]

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=20180119150800.GB887@minitux \
    --to=bjorn.andersson@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    /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