diff options
author | Justin Green <[email protected]> | 2024-03-07 13:00:51 -0500 |
---|---|---|
committer | Chun-Kuang Hu <[email protected]> | 2024-04-01 14:52:31 +0000 |
commit | 1e4350095e8ab2577ee05f8c3b044e661b5af9a0 (patch) | |
tree | 09c9fb240696ca70990768104787ccc1d7726fab /rust/helpers/helpers.c | |
parent | 60cb97cc915228b36697f75228ffdfb152b01c93 (diff) |
drm/mediatek: Add 0 size check to mtk_drm_gem_obj
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 <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: CK Hu <[email protected]>
Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Signed-off-by: Chun-Kuang Hu <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions