diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2017-10-09 11:44:01 +0300 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2017-10-16 01:44:49 +0300 |
commit | 238604ca0b708319e089e22545bcda39afb5faa8 (patch) | |
tree | 9fd7845c9bc84181250fb24867e62f83949a304f /drivers/gpu/drm | |
parent | 0a51897bfac9886d36e986d009df0317582b19a2 (diff) | |
download | linux-238604ca0b708319e089e22545bcda39afb5faa8.tar.xz |
drm/exynos: Clear drvdata after component unbind
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index aa770bb0153c..82b72425a42f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -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); } |