Skip to content

Commit 8722ded

Browse files
Dan Carpenterjohnharr-intel
authored andcommitted
drm/i915: Fix error pointer dereference in i915_gem_do_execbuffer()
Originally "out_fence" was set using out_fence = sync_file_create() but which returns NULL, but now it is set with out_fence = eb_requests_create() which returns error pointers. The error path needs to be modified to avoid an Oops in the "goto err_request;" path. Fixes: 544460c ("drm/i915: Multi-BB execbuf") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Signed-off-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 67b858d commit 8722ded

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,6 +3366,7 @@ i915_gem_do_execbuffer(struct drm_device *dev,
33663366
out_fence = eb_requests_create(&eb, in_fence, out_fence_fd);
33673367
if (IS_ERR(out_fence)) {
33683368
err = PTR_ERR(out_fence);
3369+
out_fence = NULL;
33693370
if (eb.requests[0])
33703371
goto err_request;
33713372
else

0 commit comments

Comments
 (0)