Collected perf patches for stable 5.10.y
Subsystems (3)
cover Collected perf patches for stable 5.10.y
I collected some bugfix perf patches which are missing for 5.10.y, please consider to apply.
Athira Rajeev (1):
powerpc/perf: Invoke per-CPU variable access with disabled interrupts
Jianlin Lv (1):
perf tools: Fix arm64 build error with gcc-11
Martin Liška (1):
perf annotate: Fix jump parsing for C++ code.
Namhyung Kim (1):
perf record: Fix memory leak in vDSO found using ASAN
Riccardo Mancini (2):
perf env: Fix memory leak of bpf_prog_info_linear member perf symbol-elf: Fix memory leak by freeing sdt_note.args
arch/powerpc/perf/core-book3s.c | 10 ++++++---- tools/perf/arch/arm/include/perf_regs.h | 2 +- tools/perf/arch/arm64/include/perf_regs.h | 2 +- tools/perf/arch/csky/include/perf_regs.h | 2 +- tools/perf/arch/powerpc/include/perf_regs.h | 2 +- tools/perf/arch/riscv/include/perf_regs.h | 2 +- tools/perf/arch/s390/include/perf_regs.h | 2 +- tools/perf/arch/x86/include/perf_regs.h | 2 +- tools/perf/util/annotate.c | 8 ++++++++ tools/perf/util/annotate.h | 1 + tools/perf/util/env.c | 1 + tools/perf/util/perf_regs.h | 7 +++++++ tools/perf/util/symbol-elf.c | 1 + tools/perf/util/vdso.c | 2 ++ 14 files changed, 33 insertions(+), 11 deletions(-)
Signature · 1 line
1.7.12.4
PATCH 1/6 perf env: Fix memory leak of bpf_prog_info_linear member
From: Riccardo Mancini <[email protected]>
commit 67069a1f0fe5f9eeca86d954fff2087f5542a008 upstream.
ASan reported a memory leak caused by info_linear not being deallocated.
The info_linear was allocated during in perf_event__synthesize_one_bpf_prog().
This patch adds the corresponding free() when bpf_prog_info_node is freed in perf_env__purge_bpf().
$ sudo ./perf record -- sleep 5 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.025 MB perf.data (8 samples) ]
=================================================================
==297735==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7688 byte(s) in 19 object(s) allocated from:
#0 0x4f420f in malloc (/home/user/linux/tools/perf/perf+0x4f420f)
#1 0xc06a74 in bpf_program__get_prog_info_linear /home/user/linux/tools/lib/bpf/libbpf.c:11113:16
#2 0xb426fe in perf_event__synthesize_one_bpf_prog /home/user/linux/tools/perf/util/bpf-event.c:191:16
#3 0xb42008 in perf_event__synthesize_bpf_events /home/user/linux/tools/perf/util/bpf-event.c:410:9
#4 0x594596 in record__synthesize /home/user/linux/tools/perf/builtin-record.c:1490:8
#5 0x58c9ac in __cmd_record /home/user/linux/tools/perf/builtin-record.c:1798:8
#6 0x58990b in cmd_record /home/user/linux/tools/perf/builtin-record.c:2901:8
#7 0x7b2a20 in run_builtin /home/user/linux/tools/perf/perf.c:313:11
#8 0x7b12ff in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8
#9 0x7b2583 in run_argv /home/user/linux/tools/perf/perf.c:409:2
#10 0x7b0d79 in main /home/user/linux/tools/perf/perf.c:539:3
#11 0x7fa357ef6b74 in __libc_start_main /usr/src/debug/glibc-2.33-8.fc34.x86_64/csu/../csu/libc-start.c:332:16--- tools/perf/util/env.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/env.c +1 -0
@@ -142,6 +142,7 @@ static void perf_env__purge_bpf(struct perf_env *env) node = rb_entry(next, struct bpf_prog_info_node, rb_node); next =rb_next (&node->rb_node);rb_erase (&node->rb_node, root); +free (node->info_linear);free (node); }
Signature · 1 line
1.7.12.4
PATCH 2/6 perf symbol-elf: Fix memory leak by freeing sdt_note.args
In reply to Hanjun GuoFrom: Riccardo Mancini <[email protected]>
commit 69c9ffed6cede9c11697861f654946e3ae95a930 upstream.
Reported by ASan.
--- tools/perf/util/symbol-elf.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/symbol-elf.c +1 -0
@@ -2360,6 +2360,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes)list_for_each_entry_safe (pos, tmp, sdt_notes, note_list) {list_del_init (&pos->note_list); +zfree (&pos->args);zfree (&pos->name);zfree (&pos->provider);free (pos);
Signature · 1 line
1.7.12.4
PATCH 3/6 perf record: Fix memory leak in vDSO found using ASAN
In reply to Hanjun GuoFrom: Namhyung Kim <[email protected]>
commit 41d585411311abf187e5f09042978fe7073a9375 upstream.
I got several memory leak reports from Asan with a simple command. It was because VDSO is not released due to the refcount. Like in __dsos_addnew_id(), it should put the refcount after adding to the list.
$ perf record true [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.030 MB perf.data (10 samples) ]
=================================================================
==692599==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 439 byte(s) in 1 object(s) allocated from:
#0 0x7fea52341037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x559bce4aa8ee in dso__new_id util/dso.c:1256
#2 0x559bce59245a in __machine__addnew_vdso util/vdso.c:132
#3 0x559bce59245a in machine__findnew_vdso util/vdso.c:347
#4 0x559bce50826c in map__new util/map.c:175
#5 0x559bce503c92 in machine__process_mmap2_event util/machine.c:1787
#6 0x559bce512f6b in machines__deliver_event util/session.c:1481
#7 0x559bce515107 in perf_session__deliver_event util/session.c:1551
#8 0x559bce51d4d2 in do_flush util/ordered-events.c:244
#9 0x559bce51d4d2 in __ordered_events__flush util/ordered-events.c:323
#10 0x559bce519bea in __perf_session__process_events util/session.c:2268
#11 0x559bce519bea in perf_session__process_events util/session.c:2297
#12 0x559bce2e7a52 in process_buildids /home/namhyung/project/linux/tools/perf/builtin-record.c:1017
#13 0x559bce2e7a52 in record__finish_output /home/namhyung/project/linux/tools/perf/builtin-record.c:1234
#14 0x559bce2ed4f6 in __cmd_record /home/namhyung/project/linux/tools/perf/builtin-record.c:2026
#15 0x559bce2ed4f6 in cmd_record /home/namhyung/project/linux/tools/perf/builtin-record.c:2858
#16 0x559bce422db4 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:313
#17 0x559bce2acac8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:365
#18 0x559bce2acac8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:409
#19 0x559bce2acac8 in main /home/namhyung/project/linux/tools/perf/perf.c:539
#20 0x7fea51e76d09 in __libc_start_main ../csu/libc-start.c:308Indirect leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x7fea52341037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x559bce520907 in nsinfo__copy util/namespaces.c:169
#2 0x559bce50821b in map__new util/map.c:168
#3 0x559bce503c92 in machine__process_mmap2_event util/machine.c:1787
#4 0x559bce512f6b in machines__deliver_event util/session.c:1481
#5 0x559bce515107 in perf_session__deliver_event util/session.c:1551
#6 0x559bce51d4d2 in do_flush util/ordered-events.c:244
#7 0x559bce51d4d2 in __ordered_events__flush util/ordered-events.c:323
#8 0x559bce519bea in __perf_session__process_events util/session.c:2268
#9 0x559bce519bea in perf_session__process_events util/session.c:2297
#10 0x559bce2e7a52 in process_buildids /home/namhyung/project/linux/tools/perf/builtin-record.c:1017
#11 0x559bce2e7a52 in record__finish_output /home/namhyung/project/linux/tools/perf/builtin-record.c:1234
#12 0x559bce2ed4f6 in __cmd_record /home/namhyung/project/linux/tools/perf/builtin-record.c:2026
#13 0x559bce2ed4f6 in cmd_record /home/namhyung/project/linux/tools/perf/builtin-record.c:2858
#14 0x559bce422db4 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:313
#15 0x559bce2acac8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:365
#16 0x559bce2acac8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:409
#17 0x559bce2acac8 in main /home/namhyung/project/linux/tools/perf/perf.c:539
#18 0x7fea51e76d09 in __libc_start_main ../csu/libc-start.c:308SUMMARY: AddressSanitizer: 471 byte(s) leaked in 2 allocation(s).
--- tools/perf/util/vdso.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/util/vdso.c +2 -0
@@ -133,6 +133,8 @@ static struct dso *__machine__addnew_vdso(struct machine *machine, const char *sif (dso !=NULL ) {__dsos__add (&machine->dsos, dso);dso__set_long_name (dso, long_name, false); +/* Put dso here because __dsos_add already got it */ +dso__put (dso); }return dso;
Signature · 1 line
1.7.12.4
PATCH 4/6 perf tools: Fix arm64 build error with gcc-11
In reply to Hanjun GuoFrom: Jianlin Lv <[email protected]>
commit 067012974c8ae31a8886046df082aeba93592972 upstream.
gcc version: 11.0.0 20210208 (experimental) (GCC)
Following build error on arm64:
.......
In function ‘printf’,
inlined from ‘regs_dump__printf’ at util/session.c:1141:3, inlined from ‘regs__printf’ at util/session.c:1169:2:/usr/include/aarch64-linux-gnu/bits/stdio2.h:107:10: \
error: ‘%-5s’ directive argument is null [-Werror=format-overflow=]
107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, \
__va_arg_pack ());......
In function ‘fprintf’,
inlined from ‘perf_sample__fprintf_regs.isra’ at \
builtin-script.c:622:14:/usr/include/aarch64-linux-gnu/bits/stdio2.h:100:10: \
error: ‘%5s’ directive argument is null [-Werror=format-overflow=]
100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
101 | __va_arg_pack ());
cc1: all warnings being treated as errors
.......
This patch fixes Wformat-overflow warnings. Add helper function to convert NULL to "unknown".
--- tools/perf/arch/arm/include/perf_regs.h | 2 +- tools/perf/arch/arm64/include/perf_regs.h | 2 +- tools/perf/arch/csky/include/perf_regs.h | 2 +- tools/perf/arch/powerpc/include/perf_regs.h | 2 +- tools/perf/arch/riscv/include/perf_regs.h | 2 +- tools/perf/arch/s390/include/perf_regs.h | 2 +- tools/perf/arch/x86/include/perf_regs.h | 2 +- tools/perf/util/perf_regs.h | 7 +++++++ 8 files changed, 14 insertions(+), 7 deletions(-)
tools/perf/arch/arm/include/perf_regs.h +1 -1
@@ -15,7 +15,7 @@#define PERF_REG_IP PERF_REG_ARM_PC#define PERF_REG_SP PERF_REG_ARM_SP -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {switch (id) {case PERF_REG_ARM_R0 :
tools/perf/arch/arm64/include/perf_regs.h +1 -1
@@ -15,7 +15,7 @@#define PERF_REG_IP PERF_REG_ARM64_PC#define PERF_REG_SP PERF_REG_ARM64_SP -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {switch (id) {case PERF_REG_ARM64_X0 :
tools/perf/arch/csky/include/perf_regs.h +1 -1
@@ -15,7 +15,7 @@#define PERF_REG_IP PERF_REG_CSKY_PC#define PERF_REG_SP PERF_REG_CSKY_SP -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {switch (id) {case PERF_REG_CSKY_A0 :
tools/perf/arch/powerpc/include/perf_regs.h +1 -1
@@ -73,7 +73,7 @@ [PERF_REG_POWERPC_SIER3] = "sier3", }; -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {return reg_names[id]; }
tools/perf/arch/riscv/include/perf_regs.h +1 -1
@@ -19,7 +19,7 @@#define PERF_REG_IP PERF_REG_RISCV_PC#define PERF_REG_SP PERF_REG_RISCV_SP -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {switch (id) {case PERF_REG_RISCV_PC :
tools/perf/arch/s390/include/perf_regs.h +1 -1
@@ -14,7 +14,7 @@#define PERF_REG_IP PERF_REG_S390_PC#define PERF_REG_SP PERF_REG_S390_R15 -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {switch (id) {case PERF_REG_S390_R0 :
tools/perf/arch/x86/include/perf_regs.h +1 -1
@@ -23,7 +23,7 @@#define PERF_REG_IP PERF_REG_X86_IP#define PERF_REG_SP PERF_REG_X86_SP -static inline const char *perf_reg_name (int id) +static inline const char *__perf_reg_name (int id) {switch (id) {case PERF_REG_X86_AX :
tools/perf/util/perf_regs.h +7 -0
@@ -33,6 +33,13 @@ enum {int perf_reg_value (u64 *valp,struct regs_dump *regs,int id); +static inline const char *perf_reg_name (int id) +{ +const char *reg_name =__perf_reg_name (id); + +return reg_name ?:"unknown" ; +} +#else #define PERF_REGS_MASK 0#define PERF_REGS_MAX 0
Signature · 1 line
1.7.12.4
PATCH 5/6 perf annotate: Fix jump parsing for C++ code.
In reply to Hanjun GuoFrom: Martin Liška <[email protected]>
commit 1f0e6edcd968ff19211245f7da6039e983aa51e5 upstream.
Considering the following testcase:
int
foo(int a, int b)
{
for (unsigned i = 0; i < 1000000000; i++)
a += b;
return a;
}
int main()
{
foo (3, 4);
return 0;
}'perf annotate' displays:
86.52 │40055e: → ja 40056c <foo(int, int)+0x26>
13.37 │400560: mov -0x18(%rbp),%eax
│400563: add %eax,-0x14(%rbp)
│400566: addl $0x1,-0x4(%rbp)
0.11 │40056a: → jmp 400557 <foo(int, int)+0x11>
│40056c: mov -0x14(%rbp),%eax
│40056f: pop %rbpand the 'ja 40056c' does not link to the location in the function. It's caused by fact that comma is wrongly parsed, it's part of function signature.
With my patch I see:
86.52 │ ┌──ja 26
13.37 │ │ mov -0x18(%rbp),%eax
│ │ add %eax,-0x14(%rbp)
│ │ addl $0x1,-0x4(%rbp)
0.11 │ │↑ jmp 11
│26:└─→mov -0x14(%rbp),%eaxand 'o' output prints:
86.52 │4005┌── ↓ ja 40056c <foo(int, int)+0x26>
13.37 │4005│0: mov -0x18(%rbp),%eax
│4005│3: add %eax,-0x14(%rbp)
│4005│6: addl $0x1,-0x4(%rbp)
0.11 │4005│a: ↑ jmp 400557 <foo(int, int)+0x11>
│4005└─→ mov -0x14(%rbp),%eaxOn the contrary, compiling the very same file with gcc -x c, the parsing is fine because function arguments are not displayed:
jmp 400543 <foo+0x1d>
Committer testing:
Before:
$ cat cpp_args_annotate.c
int
foo(int a, int b)
{
for (unsigned i = 0; i < 1000000000; i++)
a += b;
return a;
} int main()
{
foo (3, 4);
return 0;
}
$ gcc --version |& head -1
gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
$ gcc -g cpp_args_annotate.c -o cpp_args_annotate
$ perf record ./cpp_args_annotate
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.275 MB perf.data (7188 samples) ]
$ perf annotate --stdio2 foo
Samples: 7K of event 'cycles:u', 4000 Hz, Event count (approx.): 7468429289, [percent: local period]
foo() /home/acme/c/cpp_args_annotate
Percent
0000000000401106 <foo>:
foo():
int
foo(int a, int b)
{
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
for (unsigned i = 0; i < 1000000000; i++)
movl $0x0,-0x4(%rbp)
↓ jmp 1d
a += b;
13.45 13: mov -0x18(%rbp),%eax
add %eax,-0x14(%rbp)
for (unsigned i = 0; i < 1000000000; i++)
addl $0x1,-0x4(%rbp)
0.09 1d: cmpl $0x3b9ac9ff,-0x4(%rbp)
86.46 ↑ jbe 13
return a;
mov -0x14(%rbp),%eax
}
pop %rbp
← retq
$I.e. works for C, now lets switch to C++:
$ g++ -g cpp_args_annotate.c -o cpp_args_annotate
$ perf record ./cpp_args_annotate
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.268 MB perf.data (6976 samples) ]
$ perf annotate --stdio2 foo
Samples: 6K of event 'cycles:u', 4000 Hz, Event count (approx.): 7380681761, [percent: local period]
foo() /home/acme/c/cpp_args_annotate
Percent
0000000000401106 <foo(int, int)>:
foo(int, int):
int
foo(int a, int b)
{
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
for (unsigned i = 0; i < 1000000000; i++)
movl $0x0,-0x4(%rbp)
cmpl $0x3b9ac9ff,-0x4(%rbp)
86.53 → ja 40112c <foo(int, int)+0x26>
a += b;
13.32 mov -0x18(%rbp),%eax
0.00 add %eax,-0x14(%rbp)
for (unsigned i = 0; i < 1000000000; i++)
addl $0x1,-0x4(%rbp)
0.15 → jmp 401117 <foo(int, int)+0x11>
return a;
mov -0x14(%rbp),%eax
}
pop %rbp
← retq
$Reproduced.
Now with this patch:
Reusing the C++ built binary, as we can see here:
$ readelf -wi cpp_args_annotate | grep producer
<c> DW_AT_producer : (indirect string, offset: 0x2e): GNU C++14 10.2.1 20201125 (Red Hat 10.2.1-9) -mtune=generic -march=x86-64 -g
$And furthermore:
$ file cpp_args_annotate cpp_args_annotate: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=4fe3cab260204765605ec630d0dc7a7e93c361a9, for GNU/Linux 3.2.0, with debug_info, not stripped $ perf buildid-list -i cpp_args_annotate 4fe3cab260204765605ec630d0dc7a7e93c361a9 $ perf buildid-list | grep cpp_args_annotate 4fe3cab260204765605ec630d0dc7a7e93c361a9 /home/acme/c/cpp_args_annotate $
It now works:
$ perf annotate --stdio2 foo
Samples: 6K of event 'cycles:u', 4000 Hz, Event count (approx.): 7380681761, [percent: local period]
foo() /home/acme/c/cpp_args_annotate
Percent
0000000000401106 <foo(int, int)>:
foo(int, int):
int
foo(int a, int b)
{
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
for (unsigned i = 0; i < 1000000000; i++)
movl $0x0,-0x4(%rbp)
11: cmpl $0x3b9ac9ff,-0x4(%rbp)
86.53 ↓ ja 26
a += b;
13.32 mov -0x18(%rbp),%eax
0.00 add %eax,-0x14(%rbp)
for (unsigned i = 0; i < 1000000000; i++)
addl $0x1,-0x4(%rbp)
0.15 ↑ jmp 11
return a;
26: mov -0x14(%rbp),%eax
}
pop %rbp
← retq
$--- tools/perf/util/annotate.c | 8 ++++++++ tools/perf/util/annotate.h | 1 + 2 files changed, 9 insertions(+)
tools/perf/util/annotate.c +8 -0
@@ -317,12 +317,18 @@ bool ins__is_call(const struct ins *ins)/* * Prevents from matching commas in the comment section, e.g.: * ffff200008446e70: b.cs ffff2000084470f4 <generic_exec_single+0x314> // b.hs, b.nlast +* +* and skip comma as part of function arguments, e.g.: +* 1d8b4ac <linemap_lookup(line_maps const*, unsigned int)+0xcc> */ static inline const char *validate_comma (const char *c,struct ins_operands *ops) {if (ops->raw_comment && c > ops->raw_comment)return NULL ; +if (ops->raw_func_start && c > ops->raw_func_start) +return NULL ; +return c; }
@@ -337,6 +343,8 @@ static int jump__parse(struct arch *arch, struct ins_operands *ops, struct map_su64 start, end; ops->raw_comment =strchr (ops->raw, arch->objdump.comment_char); + ops->raw_func_start =strchr (ops->raw,'<' ); + c =validate_comma (c, ops);/*
tools/perf/util/annotate.h +1 -0
@@ -32,6 +32,7 @@ struct ins {struct ins_operands {char *raw;char *raw_comment; +char *raw_func_start;struct {char *raw;char *name;
Signature · 1 line
1.7.12.4
PATCH 6/6 powerpc/perf: Invoke per-CPU variable access with disabled interrupts
In reply to Hanjun GuoFrom: Athira Rajeev <[email protected]>
commit f66de7ac4849eb42a7b18e26b8ee49e08130fd27 upstream.
The power_pmu_event_init() callback access per-cpu variable (cpu_hw_events) to check for event constraints and Branch Stack (BHRB). Current usage is to disable preemption when accessing the per-cpu variable, but this does not prevent timer callback from interrupting event_init. Fix this by using 'local_irq_save/restore' to make sure the code path is invoked with disabled interrupts.
This change is tested in mambo simulator to ensure that, if a timer interrupt comes in during the per-cpu access in event_init, it will be soft masked and replayed later. For testing purpose, introduced a udelay() in power_pmu_event_init() to make sure a timer interrupt arrives while in per-cpu variable access code between local_irq_save/resore. As expected the timer interrupt was replayed later during local_irq_restore called from power_pmu_event_init. This was confirmed by adding breakpoint in mambo and checking the backtrace when timer_interrupt was hit.
--- arch/powerpc/perf/core-book3s.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
arch/powerpc/perf/core-book3s.c +6 -4
@@ -1884,7 +1884,7 @@ static bool is_event_blacklisted(u64 ev)static int power_pmu_event_init (struct perf_event *event) {u64 ev; -unsigned long flags; +unsigned long flags, irq_flags;struct perf_event *ctrs[MAX_HWEVENTS ];u64 events[MAX_HWEVENTS ];unsigned int cflags[MAX_HWEVENTS ];
@@ -1992,7 +1992,9 @@ static int power_pmu_event_init(struct perf_event *event)if (check_excludes (ctrs, cflags, n,1 ))return -EINVAL ; - cpuhw = &get_cpu_var (cpu_hw_events); +local_irq_save (irq_flags); + cpuhw =this_cpu_ptr (&cpu_hw_events); + err =power_check_constraints (cpuhw, events, cflags, n +1 );if (has_branch_stack (event)) {
@@ -2003,13 +2005,13 @@ static int power_pmu_event_init(struct perf_event *event) event->attr.branch_sample_type);if (bhrb_filter ==-1 ) { -put_cpu_var (cpu_hw_events); +local_irq_restore (irq_flags);return -EOPNOTSUPP ; } cpuhw->bhrb_filter = bhrb_filter; } -put_cpu_var (cpu_hw_events); +local_irq_restore (irq_flags);if (err)return -EINVAL ;
Signature · 1 line
1.7.12.4
Greg KH
maintainerQuoted 2 lines · Hanjun Guo
I collected some bugfix perf patches which are missing for 5.10.y, please consider to apply.
Now queued up, thanks.
greg k-h