nvme: fixup race with namespace removal
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | nvme: do not quiesce or unquiesce invalid namespacesdrivers/ | +8 | 0 replies | |
| 2/3 | nvme: shorten race window in nvme_ns_remove()drivers/ | +4 | 5 replies | |
| 2/3 | nvme: shorten race window in nvme_ns_remove()drivers/ | +1 | 5 replies | |
| 2/3 | nvme: shorten race window in nvme_ns_remove()drivers/ drivers/ | +1 | 3 replies | |
| 2/3 | nvme: shorten race window in nvme_ns_remove() | +0 | 1 reply | |
| 3/3 | nvme-multipath: test namespace state when selecting a new pathdrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] nvme: fixup race with namespace removal
Hi all,
nvme namespace scanning might race with controller reset, causing the system to crash in myriad ways if nvme_scan_ns_list() decides to remove a namespace while resetting is active on another thread.
The main problem here is that namespace removal is not atomic. The namespace mutex needs to be dropped before calling nvme_ns_remove(), so if nvme_ns_remove() is called while traversing the list of namespaces there always will be a race condition.
This patchset tries to fix this problem by shortening the race window and check for valid namespaces in nvme_start_queue()/nvme_stop_queue().
As usual, comments and reviews are welcome.
Hannes Reinecke (3):
nvme: do not quiesce or unquiesce invalid namespaces
nvme: shorten race window in nvme_ns_remove()
nvme-multipath: test namespace state when selecting a new path
drivers/nvme/host/core.c | 18 ++++++++++++------ drivers/nvme/host/multipath.c | 6 ++++-- 2 files changed, 16 insertions(+), 8 deletions(-)
Signature · 1 line
2.16.4