7a3ecc5cc7
[ Upstream commit 1e4350095e8ab2577ee05f8c3b044e661b5af9a0 ] Add a check to mtk_drm_gem_init if we attempt to allocate a GEM object of 0 bytes. Currently, no such check exists and the kernel will panic if a userspace application attempts to allocate a 0x0 GBM buffer. Tested by attempting to allocate a 0x0 GBM buffer on an MT8188 and verifying that we now return EINVAL. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Justin Green <greenjustin@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20240307180051.4104425-1-greenjustin@chromium.org/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
mtk_cec.c | ||
mtk_cec.h | ||
mtk_disp_color.c | ||
mtk_disp_ovl.c | ||
mtk_disp_rdma.c | ||
mtk_dpi.c | ||
mtk_dpi_regs.h | ||
mtk_drm_crtc.c | ||
mtk_drm_crtc.h | ||
mtk_drm_ddp.c | ||
mtk_drm_ddp.h | ||
mtk_drm_ddp_comp.c | ||
mtk_drm_ddp_comp.h | ||
mtk_drm_drv.c | ||
mtk_drm_drv.h | ||
mtk_drm_gem.c | ||
mtk_drm_gem.h | ||
mtk_drm_plane.c | ||
mtk_drm_plane.h | ||
mtk_dsi.c | ||
mtk_hdmi.c | ||
mtk_hdmi.h | ||
mtk_hdmi_ddc.c | ||
mtk_hdmi_regs.h | ||
mtk_mipi_tx.c | ||
mtk_mipi_tx.h | ||
mtk_mt8173_mipi_tx.c | ||
mtk_mt8183_mipi_tx.c |