mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
perf symbols: Fix array sizes for binary types arrays
Following commit introduced wrong array boundaries, that could lead to
SIGSEGV.
perf symbols: Factor DSO symtab types to generic binary types
commit 44f24cb315
Author: Jiri Olsa <[email protected]>
Fixing to use proper array size.
Reported-by: Markus Trippelsdorf <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Markus Trippelsdorf <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
30f31c0a49
commit
028df76726
1 changed files with 2 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ static enum dso_binary_type binary_type_symtab[] = {
|
|||
DSO_BINARY_TYPE__NOT_FOUND,
|
||||
};
|
||||
|
||||
#define DSO_BINARY_TYPE__SYMTAB_CNT sizeof(binary_type_symtab)
|
||||
#define DSO_BINARY_TYPE__SYMTAB_CNT ARRAY_SIZE(binary_type_symtab)
|
||||
|
||||
static enum dso_binary_type binary_type_data[] = {
|
||||
DSO_BINARY_TYPE__BUILD_ID_CACHE,
|
||||
|
|
@ -72,7 +72,7 @@ static enum dso_binary_type binary_type_data[] = {
|
|||
DSO_BINARY_TYPE__NOT_FOUND,
|
||||
};
|
||||
|
||||
#define DSO_BINARY_TYPE__DATA_CNT sizeof(binary_type_data)
|
||||
#define DSO_BINARY_TYPE__DATA_CNT ARRAY_SIZE(binary_type_data)
|
||||
|
||||
int dso__name_len(const struct dso *dso)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue