All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][Repost] nvme-fcloop: Resolve warnings on RCU usage and sleep warnings
@ 2019-06-20 20:17 James Smart
  2019-06-22  0:34 ` Minwoo Im
  2019-06-28  7:08 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: James Smart @ 2019-06-20 20:17 UTC (permalink / raw)


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 at gmail.com>

---
repost fixing munged title
---
 drivers/nvme/target/fcloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 
-- 
2.13.7

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

* [PATCH][Repost] nvme-fcloop: Resolve warnings on RCU usage and sleep warnings
  2019-06-20 20:17 [PATCH][Repost] nvme-fcloop: Resolve warnings on RCU usage and sleep warnings James Smart
@ 2019-06-22  0:34 ` Minwoo Im
  2019-06-28  7:08 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Minwoo Im @ 2019-06-22  0:34 UTC (permalink / raw)


It looks good to me:

Reviewed-by: Minwoo Im <minwoo.im.dev at gmail.com>

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

* [PATCH][Repost] nvme-fcloop: Resolve warnings on RCU usage and sleep warnings
  2019-06-20 20:17 [PATCH][Repost] nvme-fcloop: Resolve warnings on RCU usage and sleep warnings James Smart
  2019-06-22  0:34 ` Minwoo Im
@ 2019-06-28  7:08 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-06-28  7:08 UTC (permalink / raw)


Thanks,

applied to nvme-5.3.

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

end of thread, other threads:[~2019-06-28  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20 20:17 [PATCH][Repost] nvme-fcloop: Resolve warnings on RCU usage and sleep warnings James Smart
2019-06-22  0:34 ` Minwoo Im
2019-06-28  7:08 ` 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.