summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target
diff options
context:
space:
mode:
authorJames Smart2019-06-20 22:17:01 +0200
committerChristoph Hellwig2019-07-09 22:16:09 +0200
commite0620bf858d3f5e7121d9e429cf7a8f04ab29bf7 (patch)
tree2f4c9b98058ca82f2fb9c7fe251e90ebbd32f9bb /drivers/nvme/target
parentnvme-fcloop: fix inconsistent lock state warnings (diff)
downloadkernel-qcow2-linux-e0620bf858d3f5e7121d9e429cf7a8f04ab29bf7.tar.gz
kernel-qcow2-linux-e0620bf858d3f5e7121d9e429cf7a8f04ab29bf7.tar.xz
kernel-qcow2-linux-e0620bf858d3f5e7121d9e429cf7a8f04ab29bf7.zip
nvme-fcloop: resolve warnings on RCU usage and sleep warnings
With additional debugging enabled, seeing warnings for suspicious RCU usage or Sleeping function called from invalid context. These both map to allocation of a work structure which is currently GFP_KERNEL, meaning it can sleep. For the RCU warning, the sequence was sleeping while holding the RCU lock. Convert the allocation to GFP_ATOMIC. Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r--drivers/nvme/target/fcloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index e64969d2a7c5..b50b53db3746 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -535,7 +535,7 @@ fcloop_fcp_req(struct nvme_fc_local_port *localport,
if (!rport->targetport)
return -ECONNREFUSED;
- tfcp_req = kzalloc(sizeof(*tfcp_req), GFP_KERNEL);
+ tfcp_req = kzalloc(sizeof(*tfcp_req), GFP_ATOMIC);
if (!tfcp_req)
return -ENOMEM;