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:	Thu, 31 Jan 2013 09:11:13 -0500
From:	Alex Deucher <alexdeucher@...il.com>
To:	"Su, Xuemin" <xuemin.su@...el.com>
Cc:	airlied@...ux.ie, airlied@...hat.com, alexander.deucher@....com,
	s.hauer@...gutronix.de, ihadzic@...earch.bell-labs.com,
	laurent.pinchart@...asonboard.com, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, chuansheng.liu@...el.com,
	yanmin_zhang@...ux.intel.com, bo.he@...el.com
Subject: Re: [PATCH] drm/radeon: Calling object_unrefer() when creating fb failure

On Thu, Jan 31, 2013 at 12:59 AM, Su, Xuemin <xuemin.su@...el.com> wrote:
> From: liu chuansheng <chuansheng.liu@...el.com>
> Date: Thu, 31 Jan 2013 22:13:00 +0800
> Subject: [PATCH] drm/radeon: Calling object_unrefer() when creating fb
>  failure
>
> When kzalloc() failed in radeon_user_framebuffer_create(), need to
> call object_unreference() to match the object_reference().
>
> Signed-off-by: liu chuansheng <chuansheng.liu@...el.com>
> Signed-off-by: xueminsu <xuemin.su@...el.com>

Thanks.  I've picked this up.

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_display.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index ff3def7..05c96fa 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -1115,8 +1115,10 @@ radeon_user_framebuffer_create(struct drm_device *dev,
>         }
>
>         radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
> -       if (radeon_fb == NULL)
> +       if (radeon_fb == NULL) {
> +               drm_gem_object_unreference_unlocked(obj);
>                 return ERR_PTR(-ENOMEM);
> +       }
>
>         ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
>         if (ret) {
> --
> 1.7.6
>
>
>
> _______________________________________________
> 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