From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
Arnd Bergmann <arnd@arndb.de>,
Omer Shpigelman <oshpigelman@habana.ai>,
"Linux-Kernel@Vger. Kernel. Org" <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 08:44:53 +0100 [thread overview]
Message-ID: <20190222074453.GB3698@kroah.com> (raw)
In-Reply-To: <CAFCwf10u1qR+GVk-B-uPU9wWgN8yVDmOmWVHRsY0ZdXDM-qiwg@mail.gmail.com>
On Fri, Feb 22, 2019 at 09:11:17AM +0200, Oded Gabbay wrote:
> On Fri, Feb 22, 2019 at 9:04 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > 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
> No, of course not.
> This patch is:
> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Great, will go queue it up now, thanks.
greg k-h
prev parent reply other threads:[~2019-02-22 7:44 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
2019-02-22 7:11 ` Oded Gabbay
2019-02-22 7:44 ` Greg Kroah-Hartman [this message]
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=20190222074453.GB3698@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