From: Mark Brown <broonie@kernel.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2 1/2] spi: spidev: fix a race condition when accessing spidev->spi
Date: Fri, 6 Jan 2023 16:16:46 +0000 [thread overview]
Message-ID: <Y7hJbjnbcxZnh/9M@sirena.org.uk> (raw)
In-Reply-To: <CAMRc=MfsUxuv6d4GXgf7aTDr3Af89JX1Na_+jWcQQGn2hngWzQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 532 bytes --]
On Fri, Jan 06, 2023 at 03:27:57PM +0100, Bartosz Golaszewski wrote:
> IMO the complication of using an RW semaphore is insignificant and
> maybe a comment next to its declaration in struct spidev would
> suffice?
The complication is using a semaphore at all, it's a pretty unusual
locking construct and the whole up/down thing isn't clear to people
who aren't familiar with it. Given that there's no clounting being
used rwlock would be a much more obvious choice if the microseconds
of extra concurrency is meaningful somehow.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-01-06 16:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 10:07 Bartosz Golaszewski
2023-01-06 10:07 ` [PATCH v2 2/2] spi: spidev: remove debug messages that access spidev->spi without locking Bartosz Golaszewski
2023-01-06 14:13 ` [PATCH v2 1/2] spi: spidev: fix a race condition when accessing spidev->spi Mark Brown
2023-01-06 14:27 ` Bartosz Golaszewski
2023-01-06 16:16 ` Mark Brown [this message]
2023-01-06 16:27 ` Bartosz Golaszewski
2023-01-06 16:34 ` Mark Brown
2023-01-06 16:36 ` Bartosz Golaszewski
2023-01-06 21:56 ` Mark Brown
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=Y7hJbjnbcxZnh/9M@sirena.org.uk \
--to=broonie@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.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®