perf kvm: fix segfault by initializing file_name to NULL
PATCH 1/1 perf kvm: fix segfault by initializing file_name to NULL
Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by commit 3786063 which moved file_name from struct perf_kvm which was initialized on the stack to an uninitialized stack variable. Fix by initializing.
Needs to be applied to 3.7 and 3.8 as well.
--- tools/perf/builtin-kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-kvm.c +1 -1
@@ -973,7 +973,7 @@ __cmd_buildid_list(const char *file_name, int argc, const char **argv) int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused) { - const char *file_name; + const char *file_name = NULL; const struct option kvm_options[] = { OPT_STRING('i', "input", &file_name, "file",
Signature · 1 line
1.7.10.1
Quoted 6 lines · David Ahern
Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by commit 3786063 which moved
file_namefrom structperf_kvmwhich was initialized on the stack to an uninitialized stack variable. Fix by initializing.Needs to be applied to 3.7 and 3.8 as well.
David, The bug has already been fixed by by Arnaldo, see:
http://git.kernel.org/?p=virt/kvm/kvm.git;a=commit;h=20914ce5b9e1ef4a35f1f09a2c9c8fb8eb1c4d86
Quoted 7 lines · Xiao Guangrong
Quoted 5 lines · David Ahern
Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by commit 3786063 which moved
file_namefrom structperf_kvmwhich was initialized on the stack to an uninitialized stack variable. Fix by initializing.
Quoted 5 lines
Quoted 1 line
Needs to be applied to 3.7 and 3.8 as well.
David, The bug has already been fixed by by Arnaldo, see:
http://git.kernel.org/?p=virt/kvm/kvm.git;a=commit;h=20914ce5b9e1ef4a35f1f09a2c9c8fb8eb1c4d86
very odd. Arnaldo's latest perf/urgent has the problem -- and no initialized variable. Seems to have been dropped somewhere.
David
Em Wed, Feb 27, 2013 at 09:43:31PM -0700, David Ahern escreveu:
Quoted 7 lines · Xiao Guangrong
Quoted 5 lines · David Ahern
Quoted 4 lines
Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by commit 3786063 which moved
file_namefrom structperf_kvmwhich was initialized on the stack to an uninitialized stack variable. Fix by initializing.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Needs to be applied to 3.7 and 3.8 as well.
David, The bug has already been fixed by by Arnaldo, see:
http://git.kernel.org/?p=virt/kvm/kvm.git;a=commit;h=20914ce5b9e1ef4a35f1f09a2c9c8fb8eb1c4d86very odd. Arnaldo's latest perf/urgent has the problem -- and no initialized variable. Seems to have been dropped somewhere.
Just fast forwarded my perf/urgent to tip/perf/urgent, checked and the fix is there as pointed out by Xiao.
- Arnaldo
Quoted 2 lines · Arnaldo Carvalho de Melo
Just fast forwarded my perf/urgent to tip/perf/urgent, checked and the fix is there as pointed out by Xiao.
hmm.... hanging out in your perf/core branch rather than perf/urgent.
David