]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.
authorEric Anholt <eric@anholt.net>
Thu, 9 Feb 2017 17:23:34 +0000 (09:23 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 19 Sep 2017 10:07:55 +0000 (12:07 +0200)
commite6a2afbc6f8b2508169768ec3fe45fb1f39573ed
tree4707349a9cc6080decccf43781af6aba6250bd4f
parenta469e7d8751ef320da6985f17d65b3954e9eca66
drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.

If a CMA allocation failed, the partially constructed BO would be
unreferenced through the normal path, and we might choose to put it in
the BO cache.  If we then reused it before it expired from the cache,
the kernel would OOPS.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.")
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/vc4/vc4_bo.c