lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACAvsv7vB_xgnOESk_Oy0SmwF8kK+6gGP-+TCSNSiXzguCLB=g@mail.gmail.com>
Date:	Sat, 10 May 2014 09:49:29 +1000
From:	Ben Skeggs <skeggsb@...il.com>
To:	Alexandre Courbot <acourbot@...dia.com>
Cc:	Ben Skeggs <bskeggs@...hat.com>,
	"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [Nouveau] [PATCH] drm/gk20a/fb: fix NULL dereference

On Fri, May 9, 2014 at 5:57 PM, Alexandre Courbot <acourbot@...dia.com> wrote:
> gk20a_ram_put() can be called with a NULL nouveau_mem in case of error.
> Handle that case the way is it done in other RAM drivers.
Got it, thanks!

>
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
> ---
>  drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c b/drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c
> index 403c88f07b99..7effd1a63458 100644
> --- a/drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c
> +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c
> @@ -36,6 +36,8 @@ gk20a_ram_put(struct nouveau_fb *pfb, struct nouveau_mem **pmem)
>         int i;
>
>         *pmem = NULL;
> +       if (unlikely(mem == NULL))
> +               return;
>
>         for (i = 0; i < mem->size; i++) {
>                 struct page *page;
> --
> 1.9.2
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ