drm/exynos: Zero the dma_addr before decreasing the refcount
authorStéphane Marchesin <marcheu@chromium.org>
Wed, 3 Oct 2012 19:22:50 +0000 (12:22 -0700)
committerGerrit <chrome-bot@google.com>
Wed, 3 Oct 2012 20:35:20 +0000 (13:35 -0700)
commit84b9d56e29d2a0d913c9041b7e60ec422cc3a2f0
treee73aadeb9d2c56014a13131b48cac4c32f59eb46
parentebfb7b7a3269640a55efcc931f2fd92467cc797e
drm/exynos: Zero the dma_addr before decreasing the refcount

Otherwise if refcount goes to 0, the buffer is freed, and we do
a use-after-free when setting the dma_addr.

BUG=chrome-os-partner:14832
TEST=compiles

Change-Id: Ie75426b43b6d3519afdab38f19031cf494715ca9
Reviewed-on: https://gerrit.chromium.org/gerrit/34532
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
drivers/gpu/drm/exynos/exynos_drm_fb.c