[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d9dfaf4b-62ba-de74-61b0-a5ca5705582b@broadcom.com>
Date: Tue, 12 Jun 2018 13:39:12 -0700
From: James Smart <james.smart@...adcom.com>
To: Johannes Thumshirn <jthumshirn@...e.de>,
Keith Busch <keith.busch@...el.com>
Cc: Sagi Grimberg <sagi@...mberg.me>,
Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
Linux NVMe Mailinglist <linux-nvme@...ts.infradead.org>,
Hannes Reinecke <hare@...e.de>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 4/5] nvmet: use atomic allocations when allocating fc
requests
On 5/15/2018 12:40 AM, Johannes Thumshirn wrote:
> fcloop_fcp_req() runs with the hctx_lock (a rcu_read_lock() locked
> section) held, so memory allocations done in this context have to be
> atomic.
...
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> ---
> 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 34712def81b1..d2209c60f95f 100644
> --- a/drivers/nvme/target/fcloop.c
> +++ b/drivers/nvme/target/fcloop.c
> @@ -509,7 +509,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;
>
Reviewed-by: James Smart <james.smart@...adcom.com>
Powered by blists - more mailing lists