* [PATCH] drm/i915/selftests: Catch error from mock_file()
@ 2017-03-13 12:47 Chris Wilson
2017-03-13 12:54 ` Tvrtko Ursulin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-13 12:47 UTC (permalink / raw)
To: intel-gfx; +Cc: drm-intel-fixes, Matthew Auld, Mika Kuoppala
The patch 791ff39ae32a: "drm/i915: Live testing for context
execution" from Feb 13, 2017, leads to the following static checker
warning:
drivers/gpu/drm/i915/selftests/i915_gem_context.c:347 igt_ctx_exec()
error: 'file' dereferencing possible ERR_PTR()
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: <drm-intel-fixes@lists.freedesktop.org>
---
drivers/gpu/drm/i915/selftests/i915_gem_context.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 3813a19a6179..1afb8b06e3e1 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -320,8 +320,8 @@ static unsigned long max_dwords(struct drm_i915_gem_object *obj)
static int igt_ctx_exec(void *arg)
{
struct drm_i915_private *i915 = arg;
- struct drm_file *file = mock_file(i915);
struct drm_i915_gem_object *obj;
+ struct drm_file *file;
IGT_TIMEOUT(end_time);
LIST_HEAD(objects);
unsigned long ncontexts, ndwords, dw;
@@ -333,6 +333,10 @@ static int igt_ctx_exec(void *arg)
* up in the expected pages of our obj.
*/
+ file = mock_file(i915);
+ if (IS_ERR(file))
+ return PTR_ERR(file);
+
mutex_lock(&i915->drm.struct_mutex);
ncontexts = 0;
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915/selftests: Catch error from mock_file()
2017-03-13 12:47 [PATCH] drm/i915/selftests: Catch error from mock_file() Chris Wilson
@ 2017-03-13 12:54 ` Tvrtko Ursulin
2017-03-13 14:29 ` Chris Wilson
2017-03-13 13:17 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-15 13:20 ` [PATCH] " Joonas Lahtinen
2 siblings, 1 reply; 5+ messages in thread
From: Tvrtko Ursulin @ 2017-03-13 12:54 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: drm-intel-fixes, Matthew Auld, Mika Kuoppala
On 13/03/2017 12:47, Chris Wilson wrote:
> The patch 791ff39ae32a: "drm/i915: Live testing for context
> execution" from Feb 13, 2017, leads to the following static checker
> warning:
>
> drivers/gpu/drm/i915/selftests/i915_gem_context.c:347 igt_ctx_exec()
> error: 'file' dereferencing possible ERR_PTR()
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: <drm-intel-fixes@lists.freedesktop.org>
> ---
> drivers/gpu/drm/i915/selftests/i915_gem_context.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 3813a19a6179..1afb8b06e3e1 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -320,8 +320,8 @@ static unsigned long max_dwords(struct drm_i915_gem_object *obj)
> static int igt_ctx_exec(void *arg)
> {
> struct drm_i915_private *i915 = arg;
> - struct drm_file *file = mock_file(i915);
> struct drm_i915_gem_object *obj;
> + struct drm_file *file;
> IGT_TIMEOUT(end_time);
> LIST_HEAD(objects);
> unsigned long ncontexts, ndwords, dw;
> @@ -333,6 +333,10 @@ static int igt_ctx_exec(void *arg)
> * up in the expected pages of our obj.
> */
>
> + file = mock_file(i915);
> + if (IS_ERR(file))
> + return PTR_ERR(file);
> +
> mutex_lock(&i915->drm.struct_mutex);
>
> ncontexts = 0;
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915/selftests: Catch error from mock_file()
2017-03-13 12:54 ` Tvrtko Ursulin
@ 2017-03-13 14:29 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-13 14:29 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx, drm-intel-fixes, Matthew Auld, Mika Kuoppala
On Mon, Mar 13, 2017 at 12:54:15PM +0000, Tvrtko Ursulin wrote:
>
> On 13/03/2017 12:47, Chris Wilson wrote:
> >The patch 791ff39ae32a: "drm/i915: Live testing for context
> >execution" from Feb 13, 2017, leads to the following static checker
> >warning:
> >
> > drivers/gpu/drm/i915/selftests/i915_gem_context.c:347 igt_ctx_exec()
> > error: 'file' dereferencing possible ERR_PTR()
> >
> >Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> >Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution")
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >Cc: Matthew Auld <matthew.auld@intel.com>
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> >Cc: <drm-intel-fixes@lists.freedesktop.org>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Pushed, thanks,
-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] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/selftests: Catch error from mock_file()
2017-03-13 12:47 [PATCH] drm/i915/selftests: Catch error from mock_file() Chris Wilson
2017-03-13 12:54 ` Tvrtko Ursulin
@ 2017-03-13 13:17 ` Patchwork
2017-03-15 13:20 ` [PATCH] " Joonas Lahtinen
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-03-13 13:17 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Catch error from mock_file()
URL : https://patchwork.freedesktop.org/series/21156/
State : success
== Summary ==
Series 21156v1 drm/i915/selftests: Catch error from mock_file()
https://patchwork.freedesktop.org/api/1.0/series/21156/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-bxt-t5700) fdo#100125
Test gvt_basic:
Subgroup invalid-placeholder-test:
incomplete -> SKIP (fi-hsw-4770r)
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 460s
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 605s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 547s
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 583s
fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 506s
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 505s
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 431s
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 431s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 443s
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 507s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 491s
fi-kbl-7500u total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18 time: 478s
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 495s
fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 599s
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 494s
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 538s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 549s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 428s
4169859871c0d838e71c317f9c6c68ba0e0b13f5 drm-tip: 2017y-03m-13d-11h-08m-03s UTC integration manifest
b2d344d drm/i915/selftests: Catch error from mock_file()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4154/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915/selftests: Catch error from mock_file()
2017-03-13 12:47 [PATCH] drm/i915/selftests: Catch error from mock_file() Chris Wilson
2017-03-13 12:54 ` Tvrtko Ursulin
2017-03-13 13:17 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-03-15 13:20 ` Joonas Lahtinen
2 siblings, 0 replies; 5+ messages in thread
From: Joonas Lahtinen @ 2017-03-15 13:20 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Mika Kuoppala, drm-intel-fixes, Matthew Auld
On ma, 2017-03-13 at 12:47 +0000, Chris Wilson wrote:
> The patch 791ff39ae32a: "drm/i915: Live testing for context
> execution" from Feb 13, 2017, leads to the following static checker
> warning:
>
> drivers/gpu/drm/i915/selftests/i915_gem_context.c:347 igt_ctx_exec()
> error: 'file' dereferencing possible ERR_PTR()
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: <drm-intel-fixes@lists.freedesktop.org>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-15 13:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 12:47 [PATCH] drm/i915/selftests: Catch error from mock_file() Chris Wilson
2017-03-13 12:54 ` Tvrtko Ursulin
2017-03-13 14:29 ` Chris Wilson
2017-03-13 13:17 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-15 13:20 ` [PATCH] " Joonas Lahtinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox