From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: wu000273@umn.edu, bleung@chromium.org
Cc: groeck@chromium.org, linux-kernel@vger.kernel.org, kjlu@umn.edu
Subject: Re: [PATCH] platform/chrome: fix a double-unlock issue
Date: Wed, 1 Jul 2020 11:10:31 +0200 [thread overview]
Message-ID: <3ee01d41-fb55-6a08-f041-f885c8b7415d@collabora.com> (raw)
In-Reply-To: <20200523031608.17918-1-wu000273@umn.edu>
Hi Qiushi,
Thank you for the patch.
On 23/5/20 5:16, wu000273@umn.edu wrote:
> From: Qiushi Wu <wu000273@umn.edu>
>
> In function cros_ec_ishtp_probe(), "up_write" is already called
> before function "cros_ec_dev_init". But "up_write" will be called
> again after the calling of the function "cros_ec_dev_init" failed.
> Thus add a call of the function “down_write” in this if branch
> for the completion of the exception handling.
>
> Fixes: 26a14267aff2 ("platform/chrome: Add ChromeOS EC ISHTP driver")
> Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Applied for 5.9
> ---
> drivers/platform/chrome/cros_ec_ishtp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
> index 93a71e93a2f1..41d60af618c9 100644
> --- a/drivers/platform/chrome/cros_ec_ishtp.c
> +++ b/drivers/platform/chrome/cros_ec_ishtp.c
> @@ -660,8 +660,10 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device)
>
> /* Register croc_ec_dev mfd */
> rv = cros_ec_dev_init(client_data);
> - if (rv)
> + if (rv) {
> + down_write(&init_lock);
> goto end_cros_ec_dev_init_error;
> + }
>
> return 0;
>
>
prev parent reply other threads:[~2020-07-01 9:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 3:16 [PATCH] platform/chrome: fix a double-unlock issue wu000273
2020-06-25 8:26 ` Enric Balletbo i Serra
2020-06-26 16:01 ` Mat King
2020-07-01 9:10 ` Enric Balletbo i Serra [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=3ee01d41-fb55-6a08-f041-f885c8b7415d@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=bleung@chromium.org \
--cc=groeck@chromium.org \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=wu000273@umn.edu \
/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).