All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-core: Use nvme_wq to queue async events and fw activation
@ 2017-09-20 11:06 Sagi Grimberg
  2017-09-20 11:06 ` [PATCH 2/2] nvme-rdma: give up reconnect if state change fails Sagi Grimberg
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sagi Grimberg @ 2017-09-20 11:06 UTC (permalink / raw)


async_event_work might race as it is executed from two different
workqueues at the moment.

Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 5589f67d2cd8..bb2aad078637 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2676,7 +2676,7 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
 	case NVME_SC_ABORT_REQ:
 		++ctrl->event_limit;
 		if (ctrl->state == NVME_CTRL_LIVE)
-			schedule_work(&ctrl->async_event_work);
+			queue_work(nvme_wq, &ctrl->async_event_work);
 		break;
 	default:
 		break;
@@ -2691,7 +2691,7 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
 		nvme_queue_scan(ctrl);
 		break;
 	case NVME_AER_NOTICE_FW_ACT_STARTING:
-		schedule_work(&ctrl->fw_act_work);
+		queue_work(nvme_wq, &ctrl->fw_act_work);
 		break;
 	default:
 		dev_warn(ctrl->device, "async event result %08x\n", result);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-09-20 17:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-20 11:06 [PATCH 1/2] nvme-core: Use nvme_wq to queue async events and fw activation Sagi Grimberg
2017-09-20 11:06 ` [PATCH 2/2] nvme-rdma: give up reconnect if state change fails Sagi Grimberg
2017-09-20 11:27   ` Johannes Thumshirn
2017-09-20 11:29     ` Sagi Grimberg
2017-09-20 12:04       ` Johannes Thumshirn
2017-09-20 17:55   ` Christoph Hellwig
2017-09-20 11:29 ` [PATCH 1/2] nvme-core: Use nvme_wq to queue async events and fw activation Johannes Thumshirn
2017-09-20 17:55 ` Christoph Hellwig

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.