From: Subash Patel subash.rp@samsung.com
This patch series is split and re-send of my original patch, after request from Inki Dae.
Below two patches add the required error checks in drm dmabuf when the system fails to allocate pages for the scatter-gather. This is very rare situation, and occurs when the system is under memory pressure.
Scatter-gather asks for memory using sg_kmalloc() and this can return no memory. Without below return value checks, the code will crash the system due to invalid pointer access.
Subash Patel (2): DRM: Exynos: return NULL if exynos_pages_to_sg fails DRM: Exynos: check for null in return value of dma_buf_map_attachment()
drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)