]> git.baikalelectronics.ru Git - kernel.git/commit
drm/exynos: fix wrong pointer access at vm close.
authorYoungJun Cho <yj44.cho@samsung.com>
Thu, 7 Feb 2013 07:17:54 +0000 (16:17 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 21 Feb 2013 06:00:26 +0000 (15:00 +0900)
commit7a502c561e9e975367370e301d8e23513524eb21
tree987b13104c42dcb337a7f9654fbc8b6edac9e99e
parent3a7dfcf9164082fd0f7daa2cf0c13c2ca4518591
drm/exynos: fix wrong pointer access at vm close.

This patch fixes wrong pointer access issue to filp->f_op and
filp->private_data.

The exynos_drm_gem_mmap_ioctl() changes filp->f_op and
filp->private_data temporarily and restore them to use
original ones in exynos_drm_gem_mmap_buffer() but there
was no lock between the changing and the restoring so
wrong pointer access to filp->f_op and filp->private_data
was induced by vm close callback.

So this patch uses mutex lock properly to resolve this issue.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_gem.c