lkml.org 
[lkml]   [2018]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/5] nvmet: use atomic allocations when allocating fc requests
From
Date


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@suse.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@broadcom.com>

\
 
 \ /
  Last update: 2018-06-12 22:40    [W:0.114 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site