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] [thread-next>] [day] [month] [year] [list]
Message-ID: <71ba4962-14fd-887f-1d40-31089dd1cf50@intel.com>
Date:   Thu, 13 Apr 2023 08:10:06 +0200
From:   Andrzej Hajda <andrzej.hajda@...el.com>
To:     Cong Liu <liucong2@...inos.cn>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Matthew Auld <matthew.auld@...el.com>,
        Andi Shyti <andi.shyti@...ux.intel.com>,
        Nirmoy Das <nirmoy.das@...el.com>,
        Matthew Brost <matthew.brost@...el.com>,
        Jonathan Cavitt <jonathan.cavitt@...el.com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/i915: Fix memory leaks in i915 selftests



On 13.04.2023 05:13, Cong Liu wrote:
> Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation")
>
> Signed-off-by: Cong Liu <liucong2@...inos.cn>
> ---

Reviewed-by: Andrzej Hajda <andrzej.hajda@...el.com>

Regards
Andrzej
>   drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> index 5361ce70d3f2..154801f1c468 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> @@ -69,8 +69,10 @@ static int fake_get_pages(struct drm_i915_gem_object *obj)
>   
>   	rem = round_up(obj->base.size, BIT(31)) >> 31;
>   	/* restricted by sg_alloc_table */
> -	if (overflows_type(rem, unsigned int))
> +	if (overflows_type(rem, unsigned int)) {
> +		kfree(pages);
>   		return -E2BIG;
> +	}
>   
>   	if (sg_alloc_table(pages, rem, GFP)) {
>   		kfree(pages);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ