From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
kernel-janitors@vger.kernel.org,
"Christian König" <christian.koenig@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>
Subject: Re: [patch] drm/radeon: add a check for allocation failure
Date: Thu, 07 Aug 2014 15:56:30 +0000 [thread overview]
Message-ID: <20140807155630.GD11899@mwanda> (raw)
In-Reply-To: <CADnq5_Mxw=ZY-7cxj440Df6PG4bFDNBvX=v70i4CR5O-277bJw@mail.gmail.com>
On Thu, Aug 07, 2014 at 11:31:15AM -0400, Alex Deucher wrote:
> On Thu, Aug 7, 2014 at 11:27 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > We can easily return -ENOMEM here if kzalloc() fails.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
> > index ccae4d9..d15d987 100644
> > --- a/drivers/gpu/drm/radeon/radeon_vm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_vm.c
> > @@ -483,6 +483,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
> > /* add a clone of the bo_va to clear the old address */
> > struct radeon_bo_va *tmp;
> > tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
> > + if (!tmp)
> > + return -ENOMEM;
>
> We need to drop the lock here too. I'll apply and fix it up. Thanks!
>
Gar. I'm sorry. I thought it looked easier than it was.
Also I really should have caught that in my qc. :/ I'm not sure what
happened.
regards,
dan carpenter
prev parent reply other threads:[~2014-08-07 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 15:27 [patch] drm/radeon: add a check for allocation failure Dan Carpenter
2014-08-07 15:31 ` Alex Deucher
2014-08-07 15:33 ` Christian König
2014-08-07 15:56 ` Dan Carpenter [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=20140807155630.GD11899@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
/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