]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/exynos: Clear drvdata after component unbind
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 9 Oct 2017 08:44:01 +0000 (10:44 +0200)
committerInki Dae <inki.dae@samsung.com>
Sun, 15 Oct 2017 22:44:49 +0000 (07:44 +0900)
When components are unbound, DRM driver is unregistered and freed,
so clear drvdata to avoid potential use-after-free issue in
suspend/resume paths.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.c

index aa770bb0153c7fdceacf9536bad5905e52145a89..82b72425a42f7977c993134a2142434d8689227f 100644 (file)
@@ -430,6 +430,7 @@ static void exynos_drm_unbind(struct device *dev)
 
        kfree(drm->dev_private);
        drm->dev_private = NULL;
+       dev_set_drvdata(dev, NULL);
 
        drm_dev_unref(drm);
 }