0482-drm-vc4-Fix-oops-when-userspace-hands-in-a-bad-BO.patch 787 B

1234567891011121314151617181920212223242526
  1. From c13643e0da4736d029d6323207a0c0bc49815a9a Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Mon, 25 Jul 2016 16:10:04 -0700
  4. Subject: [PATCH] drm/vc4: Fix oops when userspace hands in a bad BO.
  5. We'd end up NULL pointer dereferencing because we didn't take the
  6. error path out in the parent. Fixes igt vc4_lookup_fail test.
  7. Signed-off-by: Eric Anholt <eric@anholt.net>
  8. Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
  9. Cc: stable@vger.kernel.org
  10. ---
  11. drivers/gpu/drm/vc4/vc4_gem.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. --- a/drivers/gpu/drm/vc4/vc4_gem.c
  14. +++ b/drivers/gpu/drm/vc4/vc4_gem.c
  15. @@ -585,7 +585,7 @@ vc4_cl_lookup_bos(struct drm_device *dev
  16. fail:
  17. drm_free_large(handles);
  18. - return 0;
  19. + return ret;
  20. }
  21. static int