drm/i915: release mutex in i915_gem_init()'s error path
Subsystems (2)
PATCH 1/1 drm/i915: release mutex in i915_gem_init()'s error path
Found with smatch.
Signed-off-by Mika Kuoppala <[email protected]>
--- drivers/gpu/drm/i915/i915_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +3 -1
@@ -4536,8 +4536,10 @@ int i915_gem_init(struct drm_device *dev)i915_gem_init_global_gtt (dev); ret =i915_gem_context_init (dev); -if (ret) +if (ret) { +mutex_unlock (&dev->struct_mutex);return ret; + } ret =i915_gem_init_hw (dev);mutex_unlock (&dev->struct_mutex);
Signature · 1 line
1.7.9.5
Quoted 3 lines · Mika Kuoppala
Found with smatch.
Signed-off-by Mika Kuoppala <[email protected]>
Both smatch patches merged to dinq, thanks.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 7 lines · Daniel Vetter
Quoted 3 lines · Mika Kuoppala
Found with smatch.
Signed-off-by Mika Kuoppala <[email protected]>Both smatch patches merged to dinq, thanks.
-Daniel
CC stable?
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
Quoted 10 lines · Ben Widawsky
Quoted 7 lines · Daniel Vetter
Quoted 3 lines · Mika Kuoppala
Found with smatch.
Signed-off-by Mika Kuoppala <[email protected]>Both smatch patches merged to dinq, thanks.
-DanielCC stable?
Init tends to rarely blow up, so without a report that this is possible in the wild, nope. Quoting stable kernel rules:
- It must fix a real bug that bothers people (not a, "This could be a problem..." type thing).
Cheers, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch