From: Martin Peres <martin.peres-GANU6spQydw@public.gmane.org>
To: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] bios: fix a potential NULL deref in the PROM shadowing function
Date: Fri, 30 May 2014 01:43:26 +0200 [thread overview]
Message-ID: <5387C61E.2070203@free.fr> (raw)
In-Reply-To: <CACAvsv6SaRYhEp1QkWe_9H+XB1h8HQztZi-PP8FioE-1M2eAQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 30/05/2014 01:39, Ben Skeggs wrote:
> On Tue, May 27, 2014 at 7:15 PM, Martin Peres <martin.peres@free.fr> wrote:
>> Le 03/04/2014 22:12, Martin Peres a écrit :
>>
>>> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>>> Signed-off-by: Martin Peres <martin.peres@free.fr>
>>> ---
>>> nvkm/subdev/bios/base.c | 9 +++++----
>>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/nvkm/subdev/bios/base.c b/nvkm/subdev/bios/base.c
>>> index 3de7d81..5f8643d 100644
>>> --- a/nvkm/subdev/bios/base.c
>>> +++ b/nvkm/subdev/bios/base.c
>>> @@ -183,10 +183,11 @@ nouveau_bios_shadow_prom(struct nouveau_bios *bios)
>>> goto out;
>>>
>>> bios->data = kmalloc(bios->size, GFP_KERNEL);
>>> - if (bios->data) {
>>> - for (i = 0; i < bios->size; i += 4)
>>> - ((u32 *)bios->data)[i/4] = nv_rd32(bios, 0x300000
>>> + i);
>>> - }
>>> + if (!bios->data)
>>> + goto out;
>>> +
>>> + for (i = 0; i < bios->size; i += 4)
>>> + ((u32 *)bios->data)[i/4] = nv_rd32(bios, 0x300000 + i);
>>>
>>> /* check the PCI record header */
>>> pcir = nv_ro16(bios, 0x0018);
>>>
>> This patch never got reviewed or pushed. It should also be sent as a fix for
>> the next 3.15 rc, if possible.
> Apologies, this was indeed overlooked. I've merged it. Thanks.
And I should apologize too for not checking earlier :)
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
prev parent reply other threads:[~2014-05-29 23:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 20:12 [PATCH] bios: fix a potential NULL deref in the PROM shadowing function Martin Peres
[not found] ` <1396555961-2252-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
2014-05-27 9:15 ` Martin Peres
[not found] ` <538457CD.5080208-GANU6spQydw@public.gmane.org>
2014-05-29 23:39 ` Ben Skeggs
[not found] ` <CACAvsv6SaRYhEp1QkWe_9H+XB1h8HQztZi-PP8FioE-1M2eAQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-29 23:43 ` Martin Peres [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=5387C61E.2070203@free.fr \
--to=martin.peres-ganu6spqydw@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.