diff options
author | Zhou Qingyang <[email protected]> | 2022-01-25 00:58:55 +0800 |
---|---|---|
committer | Lyude Paul <[email protected]> | 2022-01-25 17:50:49 -0500 |
commit | 2343bcdb4747d4f418a4daf2e898b94f86c24a59 (patch) | |
tree | 7cc16cf9966e4997dc82f37a9de008f6e96543dd /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | 80ecb5d7c0f224218fdf956faec0ebe73d79f53d (diff) |
drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()
In nvkm_acr_hsfw_load_bl(), the return value of kmalloc() is directly
passed to memcpy(), which could lead to undefined behavior on failure
of kmalloc().
Fix this bug by using kmemdup() instead of kmalloc()+memcpy().
This bug was found by a static analyzer.
Builds with 'make allyesconfig' show no new warnings,
and our static analyzer no longer warns about this code.
Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"")
Signed-off-by: Zhou Qingyang <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Signed-off-by: Lyude Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions