kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Oded Gabbay <oded.gabbay@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Omer Shpigelman <oshpigelman@habana.ai>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] habanalabs: use GFP_ATOMIC under spin lock
Date: Fri, 22 Feb 2019 07:04:50 +0000	[thread overview]
Message-ID: <20190222070450.GA22604@kroah.com> (raw)
In-Reply-To: <20190222054601.4396-1-weiyongjun1@huawei.com>

On Fri, Feb 22, 2019 at 05:46:01AM +0000, Wei Yongjun wrote:
> A spin lock is taken here so we should use GFP_ATOMIC.
> 
> Fixes: 0feaf86d4e69 ("habanalabs: add virtual memory and MMU modules")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/misc/habanalabs/memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
> index 9236e52852c6..9e3491dc3b55 100644
> --- a/drivers/misc/habanalabs/memory.c
> +++ b/drivers/misc/habanalabs/memory.c
> @@ -120,7 +120,7 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
>  
>  	spin_lock(&vm->idr_lock);
>  	handle = idr_alloc(&vm->phys_pg_pack_handles, phys_pg_pack, 1, 0,
> -				GFP_KERNEL);
> +				GFP_ATOMIC);
>  	spin_unlock(&vm->idr_lock);
>  
>  	if (handle < 0) {
> 
> 
> 

Ah, nice catch!

Oded, any objection to me taking this patch?

greg k-h

  reply	other threads:[~2019-02-22  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  5:46 [PATCH -next] habanalabs: use GFP_ATOMIC under spin lock Wei Yongjun
2019-02-22  7:04 ` Greg Kroah-Hartman [this message]
2019-02-22  7:11   ` Oded Gabbay
2019-02-22  7:44     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190222070450.GA22604@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oded.gabbay@gmail.com \
    --cc=oshpigelman@habana.ai \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).