* [PATCH] drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT
@ 2016-04-26 9:08 Matthew Auld
2016-04-26 9:31 ` Chris Wilson
2016-04-26 9:55 ` ✗ Fi.CI.BAT: failure for " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Matthew Auld @ 2016-04-26 9:08 UTC (permalink / raw)
To: intel-gfx
If we are not in FULL_48BIT_PPGTT mode then we really shouldn't
continue on with our allocations, given that the call to free_pdp would
bail early without freeing everything, thus leaking memory.
v2:
(Joonas Lahtinen)
- tidy up with goto teardown path
v3:
(Joonas Lahtinen)
- use more appropriate goto label name
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 0d666b3..3ace3d0 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -567,13 +567,16 @@ static struct
i915_page_directory_pointer *alloc_pdp(struct drm_device *dev)
{
struct i915_page_directory_pointer *pdp;
- int ret = -ENOMEM;
+ int ret = -EINVAL;
- WARN_ON(!USES_FULL_48BIT_PPGTT(dev));
+ if (WARN_ON(!USES_FULL_48BIT_PPGTT(dev)))
+ goto fail;
pdp = kzalloc(sizeof(*pdp), GFP_KERNEL);
- if (!pdp)
- return ERR_PTR(-ENOMEM);
+ if (!pdp) {
+ ret = -ENOMEM;
+ goto fail;
+ }
ret = __pdp_init(dev, pdp);
if (ret)
@@ -589,7 +592,7 @@ fail_page_m:
__pdp_fini(pdp);
fail_bitmap:
kfree(pdp);
-
+fail:
return ERR_PTR(ret);
}
--
2.4.11
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT
2016-04-26 9:08 [PATCH] drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT Matthew Auld
@ 2016-04-26 9:31 ` Chris Wilson
2016-04-26 9:55 ` ✗ Fi.CI.BAT: failure for " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2016-04-26 9:31 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
On Tue, Apr 26, 2016 at 10:08:07AM +0100, Matthew Auld wrote:
> If we are not in FULL_48BIT_PPGTT mode then we really shouldn't
> continue on with our allocations, given that the call to free_pdp would
> bail early without freeing everything, thus leaking memory.
Why? Why are you second guessing the caller who asked for a
i915_page_directory struct to be allocated? Is there any reason for a
warn here?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT
2016-04-26 9:08 [PATCH] drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT Matthew Auld
2016-04-26 9:31 ` Chris Wilson
@ 2016-04-26 9:55 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-04-26 9:55 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT
URL : https://patchwork.freedesktop.org/series/6312/
State : failure
== Summary ==
Series 6312v1 drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT
http://patchwork.freedesktop.org/api/1.0/series/6312/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (hsw-gt2)
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-b-frame-sequence:
skip -> PASS (bdw-nuci7)
bdw-nuci7 total:200 pass:188 dwarn:0 dfail:0 fail:0 skip:12
bsw-nuc-2 total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41
byt-nuc total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41
hsw-brixbox total:200 pass:174 dwarn:0 dfail:0 fail:0 skip:26
hsw-gt2 total:200 pass:178 dwarn:0 dfail:0 fail:1 skip:21
ilk-hp8440p total:200 pass:139 dwarn:0 dfail:0 fail:0 skip:61
ivb-t430s total:200 pass:169 dwarn:0 dfail:0 fail:0 skip:31
skl-i7k-2 total:200 pass:173 dwarn:0 dfail:0 fail:0 skip:27
skl-nuci5 total:200 pass:189 dwarn:0 dfail:0 fail:0 skip:11
snb-dellxps total:200 pass:158 dwarn:0 dfail:0 fail:0 skip:42
snb-x220t total:200 pass:158 dwarn:0 dfail:0 fail:1 skip:41
bdw-ultra failed to connect after reboot
Results at /archive/results/CI_IGT_test/Patchwork_2067/
f814551aa7232ed36d71244dd148b48660b53a78 drm-intel-nightly: 2016y-04m-25d-11h-36m-27s UTC integration manifest
1661280 drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-26 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 9:08 [PATCH] drm/i915: bail in alloc_pdp when !FULL_48BIT_PPGTT Matthew Auld
2016-04-26 9:31 ` Chris Wilson
2016-04-26 9:55 ` ✗ Fi.CI.BAT: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox