diff options
author | Yang Jihong <yangjihong1@huawei.com> | 2024-01-19 04:03:02 +0000 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-26 18:18:29 -0400 |
commit | a99aac31221acf81106e81cef8ae531a6dfeb567 (patch) | |
tree | a3f2b7e3a3922288700d1a44b5c9f4a7832b1871 /security | |
parent | 1f7108fa7cb5a397b366527df07da53fe3002075 (diff) | |
download | linux-stable-a99aac31221acf81106e81cef8ae531a6dfeb567.tar.gz linux-stable-a99aac31221acf81106e81cef8ae531a6dfeb567.tar.bz2 linux-stable-a99aac31221acf81106e81cef8ae531a6dfeb567.zip |
perf record: Fix possible incorrect free in record__switch_output()
[ Upstream commit aff10a165201f6f60cff225083ce301ad3f5d8f1 ]
perf_data__switch() may not assign a legal value to 'new_filename'.
In this case, 'new_filename' uses the on-stack value, which may cause a
incorrect free and unexpected result.
Fixes: 03724b2e9c45 ("perf record: Allow to limit number of reported perf.data files")
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240119040304.3708522-2-yangjihong1@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions