* [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
@ 2017-07-19 22:35 Christophe JAILLET
2017-07-20 10:09 ` [Intel-gfx] " Tvrtko Ursulin
0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2017-07-19 22:35 UTC (permalink / raw)
To: daniel.vetter, jani.nikula, airlied, chris, tvrtko.ursulin
Cc: intel-gfx, dri-devel, linux-kernel, kernel-janitors, Christophe JAILLET
Goto the right label in case of error, otherwise there is a leak.
This has been introduced by c5cf9a9147ff. In this patch a goto has not been
updated.
Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 627e2aa09766..8cdec455cf7d 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -206,7 +206,7 @@ struct drm_i915_private *mock_gem_device(void)
mkwrite_device_info(i915)->ring_mask = BIT(0);
i915->engine[RCS] = mock_engine(i915, "mock");
if (!i915->engine[RCS])
- goto err_dependencies;
+ goto err_priorities;
i915->kernel_context = mock_context(i915, NULL);
if (!i915->kernel_context)
--
2.11.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
2017-07-19 22:35 [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' Christophe JAILLET
@ 2017-07-20 10:09 ` Tvrtko Ursulin
2017-07-20 10:52 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Tvrtko Ursulin @ 2017-07-20 10:09 UTC (permalink / raw)
To: Christophe JAILLET, daniel.vetter, jani.nikula, airlied, chris,
tvrtko.ursulin
Cc: intel-gfx, kernel-janitors, linux-kernel, dri-devel
On 19/07/2017 23:35, Christophe JAILLET wrote:
> Goto the right label in case of error, otherwise there is a leak.
> This has been introduced by c5cf9a9147ff. In this patch a goto has not been
> updated.
>
> Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index 627e2aa09766..8cdec455cf7d 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -206,7 +206,7 @@ struct drm_i915_private *mock_gem_device(void)
> mkwrite_device_info(i915)->ring_mask = BIT(0);
> i915->engine[RCS] = mock_engine(i915, "mock");
> if (!i915->engine[RCS])
> - goto err_dependencies;
> + goto err_priorities;
>
> i915->kernel_context = mock_context(i915, NULL);
> if (!i915->kernel_context)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
2017-07-20 10:09 ` [Intel-gfx] " Tvrtko Ursulin
@ 2017-07-20 10:52 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2017-07-20 10:52 UTC (permalink / raw)
To: Tvrtko Ursulin, Christophe JAILLET, daniel.vetter, jani.nikula,
airlied, tvrtko.ursulin
Cc: intel-gfx, kernel-janitors, linux-kernel, dri-devel
Quoting Tvrtko Ursulin (2017-07-20 11:09:53)
>
> On 19/07/2017 23:35, Christophe JAILLET wrote:
> > Goto the right label in case of error, otherwise there is a leak.
> > This has been introduced by c5cf9a9147ff. In this patch a goto has not been
> > updated.
> >
> > Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > index 627e2aa09766..8cdec455cf7d 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > @@ -206,7 +206,7 @@ struct drm_i915_private *mock_gem_device(void)
> > mkwrite_device_info(i915)->ring_mask = BIT(0);
> > i915->engine[RCS] = mock_engine(i915, "mock");
> > if (!i915->engine[RCS])
> > - goto err_dependencies;
> > + goto err_priorities;
> >
> > i915->kernel_context = mock_context(i915, NULL);
> > if (!i915->kernel_context)
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Thanks for the fix and review, pushed.
-Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-20 10:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 22:35 [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' Christophe JAILLET
2017-07-20 10:09 ` [Intel-gfx] " Tvrtko Ursulin
2017-07-20 10:52 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®