]> 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)
committerJuerg Haefliger <juerg.haefliger@canonical.com>
Wed, 13 Sep 2017 08:03:41 +0000 (10:03 +0200)
commit2092efc41b501c88d299c5800aba03bf4d370154
tree572780f0a5f632082cd98129260cb6bdabe9deb7
parent3c19e2c34f8724b769f33d947f0f23d7a3d54d2a
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