diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2014-03-12 23:40:51 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-03-14 17:45:54 +0100 |
commit | 6eeefccdcfc2cc9697562e740bfe6c35fddd4e1c (patch) | |
tree | 8485c870071abd4d7600a5441ed3539beeebd9ec /drivers/net/wireless/rt2x00/rt2500pci.c | |
parent | perf bench numa: Make no args mean 'run all tests' (diff) | |
download | linux-6eeefccdcfc2cc9697562e740bfe6c35fddd4e1c.tar.xz linux-6eeefccdcfc2cc9697562e740bfe6c35fddd4e1c.zip |
perf bench: Fix NULL pointer dereference in "perf bench all"
The for_each_bench() macro must check that the "benchmarks" field of a
collection is not NULL before dereferencing it because the "all"
collection in particular has a NULL "benchmarks" field (signifying that
it has no benchmarks to iterate over).
This fixes this NULL pointer dereference when running "perf bench all":
[root@ssdandy ~]# perf bench all
<SNIP>
# Running mem/memset benchmark...
# Copying 1MB Bytes ...
2.453675 GB/Sec
12.056327 GB/Sec (with prefault)
Segmentation fault (core dumped)
[root@ssdandy ~]#
Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1394664051-6037-1-git-send-email-patrick@parcs.ath.cx
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
0 files changed, 0 insertions, 0 deletions