summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorZephaniah E. Loss-Cutler-Hull <zephaniah@gmail.com>2019-02-09 16:25:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-21 08:17:09 +0300
commitd485c65853de6592d2e0ad9376b626be8f555905 (patch)
tree0f350c229a9e0b283b9fc3c8e99a981466f26f36 /tools/perf/scripts/python/export-to-postgresql.py
parent254b9b2971a71ddaa3623cd665bbebc862a05937 (diff)
downloadlinux-d485c65853de6592d2e0ad9376b626be8f555905.tar.xz
tools/power x86_energy_perf_policy: Fix argument parsing
[ Upstream commit 03531482402a2bc4ab93cf6dde46833775e035e9 ] The -w argument in x86_energy_perf_policy currently triggers an unconditional segfault. This is because the argument string reads: "+a:c:dD:E:e:f:m:M:rt:u:vw" and yet the argument handler expects an argument. When parse_optarg_string is called with a null argument, we then proceed to crash in strncmp, not horribly friendly. The man page describes -w as taking an argument, the long form (--hwp-window) is correctly marked as taking a required argument, and the code expects it. As such, this patch simply marks the short form (-w) as requiring an argument. Signed-off-by: Zephaniah E. Loss-Cutler-Hull <zephaniah@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions