Project

General

Profile

Bug #11964

nvme namespace attach and detach ioctls are not safe with concurrent access

Added by Paul Winder 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

The ioctls for attaching and detaching nvme namespaces are not thread safe.

If more than a single thread are to run through nvme_ioctl_attach() concurrently, there would certainly be race conditions exposed in the execution through nvme_init_ns() as well as the freeing of kmem. It would also be prudent, to serialise with nvme_ioctl_detach().

There is nm_mutex which is used for serialising exclusive access through nvme_opem()/close(). It makes sense to ex_tend the use of this.


Related issues

Follows illumos gate - Bug #11847: The nvme cmd completion queue is contentiousClosed

Actions

History

#1

Updated by Paul Winder 3 months ago

  • Follows Bug #11847: The nvme cmd completion queue is contentious added
#2

Updated by Paul Winder 3 months ago

  • Description updated (diff)
#3

Updated by Paul Winder 3 months ago

  • Description updated (diff)

Also available in: Atom PDF