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]
Date:	Mon, 4 Jul 2011 09:42:44 +1000
From:	Ben Skeggs <skeggsb@...il.com>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	linux-kernel@...r.kernel.org, Ben Skeggs <bskeggs@...hat.com>,
	dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] nouveau: Don't leak in nva3_pm_clock_pre()

On Sun, Jul 3, 2011 at 7:58 PM, Jesper Juhl <jj@...osbits.net> wrote:
> If nva3_calc_pll() returns less than 0 in
> drivers/gpu/drm/nouveau/nva3_pm.c:nva3_pm_clock_pre() we'll return
> without freeing 'pll'.
> This patch should fix the leak.
Firstly, thank you for the patch.

This issue however, no longer exists in nouveau git.  The patches
fixing it will make their way to Linus' tree.

Ben.

>
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
> ---
>  drivers/gpu/drm/nouveau/nva3_pm.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
>  Compile tested only - no hardware to test for real.
>
> diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c
> index e4b2b9e..80443d2 100644
> --- a/drivers/gpu/drm/nouveau/nva3_pm.c
> +++ b/drivers/gpu/drm/nouveau/nva3_pm.c
> @@ -137,8 +137,10 @@ nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl,
>
>        if (!pll->new_div) {
>                ret = nva3_calc_pll(dev, &limits, khz, &N, NULL, &M, &P);
> -               if (ret < 0)
> +               if (ret < 0) {
> +                       kfree(pll);
>                        return ERR_PTR(ret);
> +               }
>
>                pll->new_pnm = (P << 16) | (N << 8) | M;
>                pll->new_div = 2 - 1;
> --
> 1.7.6
>
>
> --
> Jesper Juhl <jj@...osbits.net>       http://www.chaosbits.net/
> Don't top-post http://www.catb.org/jargon/html/T/top-post.html
> Plain text mails only, please.
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
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