diff options
author | Rob Clark <robdclark@chromium.org> | 2022-10-14 01:55:13 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-10-14 19:32:22 +0300 |
commit | 83d18e9d9c0150d98dc24e3642ea93f5e245322c (patch) | |
tree | c1d52522880821215d4bdd941c4912e6cd5fa779 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 70445dee1b4cf44c9fecc580dfa08079011866f1 (diff) | |
download | linux-83d18e9d9c0150d98dc24e3642ea93f5e245322c.tar.xz |
drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage
adreno_show_object() is a trap! It will re-allocate the pointer it is
passed on first call, when the data is ascii85 encoded, using kvmalloc/
kvfree(). Which means the data *passed* to it must be kvmalloc'd, ie.
we cannot use the state_kcalloc() helper.
This partially reverts commit ec8f1813bf8d ("drm/msm/a6xx: Replace
kcalloc() with kvzalloc()"), but adds the missing kvfree() to fix the
memory leak that was present previously. And adds a warning comment.
Fixes: ec8f1813bf8d ("drm/msm/a6xx: Replace kcalloc() with kvzalloc()")
Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/20
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/507014/
Link: https://lore.kernel.org/r/20221013225520.371226-2-robdclark@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions