From: Lukas Wunner <lukas@wunner.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Alexander Duyck <alexander.h.duyck@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] Fix races on device removal
Date: Wed, 8 Jul 2020 14:48:47 +0200 [thread overview]
Message-ID: <cover.1594212527.git.lukas@wunner.de> (raw)
Prevent dynamic SPI device addition below a controller which is
being removed. To do so, set the controller's "dead" flag using
kill_device() (patch [3/3]).
Serialize access to a device's "dead" flag with a newly introduced
rw_semaphore in lieu of the device_lock to avoid deadlocks occurring
with the new use case (patch [2/3]).
Add a missing check for the "dead" flag upon driver binding
(patch [1/3]).
Lukas Wunner (3):
driver core: Avoid binding drivers to dead devices
driver core: Use rwsem for kill_device() serialization
driver core: Avoid adding children below a dead parent
drivers/base/base.h | 2 ++
drivers/base/core.c | 47 ++++++++++++++++++++++++++++++++------------
drivers/base/dd.c | 12 ++++++++++-
drivers/nvdimm/bus.c | 8 +-------
drivers/spi/spi.c | 3 +++
5 files changed, 51 insertions(+), 21 deletions(-)
--
2.27.0
next reply other threads:[~2020-07-08 13:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 12:48 Lukas Wunner [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-07-08 13:27 [PATCH 0/3] Fix races on device removal Lukas Wunner
2020-07-30 6:54 ` Greg Kroah-Hartman
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=cover.1594212527.git.lukas@wunner.de \
--to=lukas@wunner.de \
--cc=alexander.h.duyck@linux.intel.com \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pantelis.antoniou@konsulko.com \
--cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.