aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorPhilipp Stanner <[email protected]>2024-10-28 08:43:59 +0100
committerMichael S. Tsirkin <[email protected]>2024-11-06 04:40:07 -0500
commit0b364cf53b20204e92bac7c6ebd1ee7d3ec62931 (patch)
tree5a1b30274b55aaffee970c1843aca06f31a94542 /tools/perf/scripts/python/exported-sql-viewer.py
parent6ca575374dd9a507cdd16dfa0e78c2e9e20bd05f (diff)
vdpa: solidrun: Fix UB bug with devres
In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed to pcim_iomap_regions() is placed on the stack. Neither pcim_iomap_regions() nor the functions it calls copy that string. Should the string later ever be used, this, consequently, causes undefined behavior since the stack frame will by then have disappeared. Fix the bug by allocating the strings on the heap through devm_kasprintf(). Cc: [email protected] # v6.3 Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.") Reported-by: Christophe JAILLET <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Philipp Stanner <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions