From: Lyude Paul <lyude@redhat.com>
To: nouveau@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Greg KH <gregkh@linuxfoundation.org>,
Ben Skeggs <bskeggs@redhat.com>,
Karol Herbst <kherbst@redhat.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Zhou Qingyang <zhou1615@umn.edu>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Revert "drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()"
Date: Fri, 28 Jan 2022 14:59:42 -0500 [thread overview]
Message-ID: <8a01bf1d367a702cd41e6cb1281294e82a48f541.camel@redhat.com> (raw)
In-Reply-To: <20220128192951.626532-1-lyude@redhat.com>
on further reconsideration: Self-NAKing this. I don't see any issues with
those patches.
On Fri, 2022-01-28 at 14:29 -0500, Lyude Paul wrote:
> This reverts commit 2343bcdb4747d4f418a4daf2e898b94f86c24a59.
>
> Unfortunately, as Greg pointed out I totally missed the fact that this
> patch came from a umn.edu patch. umn.edu is still banned from contributing
> to the Linux kernel, so let's revert this for the time being. I'll
> re-evaluate this fix myself later and send another fix if this ends up
> being valid.
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: Greg KH <gregkh@linuxfoundation.org>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Karol Herbst <kherbst@redhat.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
> index a6ea89a5d51a..667fa016496e 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
> @@ -142,12 +142,11 @@ nvkm_acr_hsfw_load_bl(struct nvkm_acr *acr, const char
> *name, int ver,
>
> hsfw->imem_size = desc->code_size;
> hsfw->imem_tag = desc->start_tag;
> - hsfw->imem = kmemdup(data + desc->code_off, desc->code_size,
> GFP_KERNEL);
> + hsfw->imem = kmalloc(desc->code_size, GFP_KERNEL);
> + memcpy(hsfw->imem, data + desc->code_off, desc->code_size);
> +
> nvkm_firmware_put(fw);
> - if (!hsfw->imem)
> - return -ENOMEM;
> - else
> - return 0;
> + return 0;
> }
>
> int
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
next prev parent reply other threads:[~2022-01-28 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 19:29 [PATCH] Revert "drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()" Lyude Paul
2022-01-28 19:59 ` Lyude Paul [this message]
2022-01-29 8:33 ` Greg KH
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=8a01bf1d367a702cd41e6cb1281294e82a48f541.camel@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=zhou1615@umn.edu \
/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).