From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Nick Crews <ncrews@chromium.org>, bleung@chromium.org
Cc: linux-kernel@vger.kernel.org, dlaurie@chromium.org,
groeck@google.com, dtor@google.com
Subject: Re: [PATCH] platform/chrome: Fix locking pattern in wilco_ec_mailbox()
Date: Tue, 12 Mar 2019 13:15:37 +0100 [thread overview]
Message-ID: <b593cc1e-4e88-9b56-b533-4d4481dde6db@collabora.com> (raw)
In-Reply-To: <20190311155838.255314-1-ncrews@chromium.org>
Hi Nick,
On 11/3/19 16:58, Nick Crews wrote:
> Before, ec->data_buffer could be written to from multiple
> contexts at the same time. Since the ec is shared data,
> it needs to be inside the mutex as well.
>
Probably you're missing a fixes tag here.
> Signed-off-by: Nick Crews <ncrews@chromium.org>
> ---
> drivers/platform/chrome/wilco_ec/mailbox.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/wilco_ec/mailbox.c b/drivers/platform/chrome/wilco_ec/mailbox.c
> index f6ff29a11f1a..d6cb96168285 100644
> --- a/drivers/platform/chrome/wilco_ec/mailbox.c
> +++ b/drivers/platform/chrome/wilco_ec/mailbox.c
> @@ -223,12 +223,12 @@ int wilco_ec_mailbox(struct wilco_ec_device *ec, struct wilco_ec_message *msg)
> msg->command, msg->type, msg->flags, msg->response_size,
> msg->request_size);
>
> - /* Prepare request packet */
There is a reason to remove this comment?
> + mutex_lock(&ec->mailbox_lock);
> +
> rq = ec->data_buffer;
> wilco_ec_prepare(msg, rq);
> -
> - mutex_lock(&ec->mailbox_lock);
> ret = wilco_ec_transfer(ec, msg, rq);
> +
Trailing whitespaces here
> mutex_unlock(&ec->mailbox_lock);
>
> return ret;
>
You don't need to resend, I'll add the fixes tag, fix the trailing whitespaces
and queue as a fix for 5.1 once the merge window closes.
Thanks,
Enric
prev parent reply other threads:[~2019-03-12 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 15:58 Nick Crews
2019-03-12 12:15 ` 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=b593cc1e-4e88-9b56-b533-4d4481dde6db@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=bleung@chromium.org \
--cc=dlaurie@chromium.org \
--cc=dtor@google.com \
--cc=groeck@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncrews@chromium.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
all inboxes | Powered by JetHome®