From: Johan Hovold <johan@kernel.org>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
devel@driverdev.osuosl.org, keescook@chromium.org,
linux-kernel@vger.kernel.org, Mitch Tasman <tasman@leaflabs.com>,
greybus-dev@lists.linaro.org
Subject: Re: [PATCH v3 1/4] staging: greybus: loopback: Hold per-connection mutex across operations
Date: Mon, 6 Nov 2017 10:17:46 +0100 [thread overview]
Message-ID: <20171106091746.GB11226@localhost> (raw)
In-Reply-To: <1509931942-25712-2-git-send-email-pure.logic@nexus-software.ie>
On Mon, Nov 06, 2017 at 01:32:19AM +0000, Bryan O'Donoghue wrote:
> Commit d9fb3754ecf8 ("greybus: loopback: Relax locking during loopback
> operations") changes the holding of the per-connection mutex to be less
> restrictive because at the time of that commit per-connection mutexes were
> encapsulated by a per-driver level gb_dev.mutex.
>
> Commit 8e1d6c336d74 ("greybus: loopback: drop bus aggregate calculation")
> on the other hand subtracts the driver level gb_dev.mutex but neglects to
> move the mutex back to the place it was prior to commit d9fb3754ecf8
> ("greybus: loopback: Relax locking during loopback operations"), as a
> result several members of the per connection struct gb_loopback are racy.
>
> The solution is restoring the old location of mutex_unlock(&gb->mutex) as
> it was in commit d9fb3754ecf8 ("greybus: loopback: Relax locking during
> loopback operations").
>
> Fixes: 8e1d6c336d74 ("greybus: loopback: drop bus aggregate calculation")
>
> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Alex Elder <elder@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Mitch Tasman <tasman@leaflabs.com>
> Cc: greybus-dev@lists.linaro.org
> Cc: devel@driverdev.osuosl.org
> Cc: linux-kernel@vger.kernel.org
> ---
This looks like it addresses both my comments on v1 (mutex and error
stats). Thanks for tracking it down.
Reviewed-by: Johan Hovold <johan@kernel.org>
Johan
next prev parent reply other threads:[~2017-11-06 9:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 1:32 [PATCH v3 0/4] Convert greybus loopback to core async API Bryan O'Donoghue
2017-11-06 1:32 ` [PATCH v3 1/4] staging: greybus: loopback: Hold per-connection mutex across operations Bryan O'Donoghue
2017-11-06 9:17 ` Johan Hovold [this message]
2017-11-06 1:32 ` [PATCH v3 2/4] staging: greybus: loopback: Fix iteration count on async path Bryan O'Donoghue
2017-11-06 9:18 ` Johan Hovold
2017-11-06 1:32 ` [PATCH v3 3/4] staging: greybus: operation: add private data with get/set accessors Bryan O'Donoghue
2017-11-06 1:32 ` [PATCH v3 4/4] staging: greybus: loopback: convert loopback to use generic async operations Bryan O'Donoghue
2017-11-06 9:19 ` Johan Hovold
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=20171106091746.GB11226@localhost \
--to=johan@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pure.logic@nexus-software.ie \
--cc=tasman@leaflabs.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