From: Jani Nikula <jani.nikula@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
Cong Liu <liucong2@kylinos.cn>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Matthew Auld <matthew.auld@intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>,
Nirmoy Das <nirmoy.das@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Jonathan Cavitt <jonathan.cavitt@intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix memory leaks in i915 selftests
Date: Thu, 13 Apr 2023 10:15:07 +0300 [thread overview]
Message-ID: <874jpkckxw.fsf@intel.com> (raw)
In-Reply-To: <71ba4962-14fd-887f-1d40-31089dd1cf50@intel.com>
On Thu, 13 Apr 2023, Andrzej Hajda <andrzej.hajda@intel.com> wrote:
> On 13.04.2023 05:13, Cong Liu wrote:
A commit message is still needed.
>> Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation")
>>
No blank line here.
BR,
Jani.
>> Signed-off-by: Cong Liu <liucong2@kylinos.cn>
>> ---
>
> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.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);
>
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
Cong Liu <liucong2@kylinos.cn>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Matthew Auld <matthew.auld@intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>,
Nirmoy Das <nirmoy.das@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Jonathan Cavitt <jonathan.cavitt@intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/i915: Fix memory leaks in i915 selftests
Date: Thu, 13 Apr 2023 10:15:07 +0300 [thread overview]
Message-ID: <874jpkckxw.fsf@intel.com> (raw)
In-Reply-To: <71ba4962-14fd-887f-1d40-31089dd1cf50@intel.com>
On Thu, 13 Apr 2023, Andrzej Hajda <andrzej.hajda@intel.com> wrote:
> On 13.04.2023 05:13, Cong Liu wrote:
A commit message is still needed.
>> Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation")
>>
No blank line here.
BR,
Jani.
>> Signed-off-by: Cong Liu <liucong2@kylinos.cn>
>> ---
>
> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.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);
>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-04-13 7:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 3:13 [Intel-gfx] [PATCH] drm/i915: Fix memory leaks in i915 selftests Cong Liu
2023-04-13 3:13 ` Cong Liu
2023-04-13 6:10 ` [Intel-gfx] " Andrzej Hajda
2023-04-13 6:10 ` Andrzej Hajda
2023-04-13 7:15 ` Jani Nikula [this message]
2023-04-13 7:15 ` Jani Nikula
2023-04-13 7:55 ` [Intel-gfx] " Cong Liu
2023-04-13 7:55 ` Cong Liu
2023-04-13 7:55 ` Cong Liu
2023-04-13 8:44 ` [Intel-gfx] " Andi Shyti
2023-04-13 8:44 ` Andi Shyti
2023-04-13 8:44 ` Andi Shyti
2023-04-13 9:07 ` [Intel-gfx] " Cong Liu
2023-04-13 9:07 ` Cong Liu
2023-04-13 9:07 ` Cong Liu
2023-04-13 8:15 ` [Intel-gfx] " Andi Shyti
2023-04-13 8:15 ` Andi Shyti
2023-04-13 8:15 ` Andi Shyti
2023-04-21 18:05 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Fix memory leaks in i915 selftests (rev4) Patchwork
2023-04-21 18:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-22 3:38 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=874jpkckxw.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=andi.shyti@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gwan-gyeong.mun@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liucong2@kylinos.cn \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=mchehab@kernel.org \
--cc=nirmoy.das@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.