aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/synth_event_gen_test.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-01-29 17:06:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-17 11:02:25 +0100
commit143b87907788e18326de5f0afa694ec633b56d85 (patch)
tree22073ba16f8b8260e353fefce38aa9787c1eee74 /kernel/trace/synth_event_gen_test.c
parent1d7c1456692446e73b67532d0a4e7964129c742a (diff)
downloadkernel_replicant_linux-143b87907788e18326de5f0afa694ec633b56d85.tar.gz
kernel_replicant_linux-143b87907788e18326de5f0afa694ec633b56d85.tar.bz2
kernel_replicant_linux-143b87907788e18326de5f0afa694ec633b56d85.zip
drm/vc4: hvs: Fix buffer overflow with the dlist handling
[ Upstream commit facd93f4285c405f9a91b05166147cb39e860666 ] Commit 0a038c1c29a7 ("drm/vc4: Move LBM creation out of vc4_plane_mode_set()") changed the LBM allocation logic from first allocating the LBM memory for the plane to running mode_set, adding a gap in the LBM, and then running the dlist allocation filling that gap. The gap was introduced by incrementing the dlist array index, but was never checking whether or not we were over the array length, leading eventually to memory corruptions if we ever crossed this limit. vc4_dlist_write had that logic though, and was reallocating a larger dlist array when reaching the end of the buffer. Let's share the logic between both functions. Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Eric Anholt <eric@anholt.net> Fixes: 0a038c1c29a7 ("drm/vc4: Move LBM creation out of vc4_plane_mode_set()") Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129160647.128373-1-maxime@cerno.tech Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/trace/synth_event_gen_test.c')
0 files changed, 0 insertions, 0 deletions