Actions
Bug #11964
opennvme namespace attach and detach ioctls are not safe with concurrent access
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
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
Updated by Paul Winder over 2 years ago
- Follows Bug #11847: The nvme cmd completion queue is contentious added
Actions