Commit 7929b50d authored by Adrian Hunter's avatar Adrian Hunter Committed by Greg Kroah-Hartman

perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

commit c3a0bbc7 upstream.

Address filtering with kernel symbols incorrectly resulted in the error
"Cannot determine size of symbol" because the no_size logic was the wrong
way around.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Tested-by: default avatarAndi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1490357752-27942-1-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e3cea383
...@@ -1826,7 +1826,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt) ...@@ -1826,7 +1826,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)
filt->addr = start; filt->addr = start;
if (filt->range && !filt->size && !filt->sym_to) { if (filt->range && !filt->size && !filt->sym_to) {
filt->size = size; filt->size = size;
no_size = !!size; no_size = !size;
} }
} }
...@@ -1840,7 +1840,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt) ...@@ -1840,7 +1840,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)
if (err) if (err)
return err; return err;
filt->size = start + size - filt->addr; filt->size = start + size - filt->addr;
no_size = !!size; no_size = !size;
} }
/* The very last symbol in kallsyms does not imply a particular size */ /* The very last symbol in kallsyms does not imply a particular size */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment