Re: [PATCH 1/9] nvme: fix the dangerous reference of namespaces list

2018-02-11 Thread Sagi Grimberg
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e810487..bc05bc4 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3092,11 +3092,20 @@ static void nvme_remove_invalid_namespaces(struct nvme_ctrl *ctrl, unsigned

Re: [PATCH 1/9] nvme: fix the dangerous reference of namespaces list

2018-02-11 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

[PATCH 1/9] nvme: fix the dangerous reference of namespaces list

2018-02-11 Thread Jianchao Wang
nvme_remove_namespaces and nvme_remove_invalid_namespaces reference the ctrl->namespaces list w/o holding namespaces_mutext. It is ok to invoke nvme_ns_remove there, but what if there is others. To be safer, reference the ctrl->namespaces list under namespaces_mutext. Signed-off-by: Jianchao Wang