summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-12 12:04:50 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-12 12:04:50 +0200
commit6dcf6a4eb95a8a78c181cd27132f41aca36aeb94 (patch)
tree6f9837d576eb010e3aac64c95946669b87cabea5
parentMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff)
parentperf/hw_breakpoint: Fix arch_hw_breakpoint use-before-initialization (diff)
downloadlinux-6dcf6a4eb95a8a78c181cd27132f41aca36aeb94.tar.xz
linux-6dcf6a4eb95a8a78c181cd27132f41aca36aeb94.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Ingo Molnar: "Fix an initialization bug in the hw-breakpoints, which triggered on the ARM platform" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/hw_breakpoint: Fix arch_hw_breakpoint use-before-initialization
-rw-r--r--kernel/events/hw_breakpoint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index c5cd852fe86b..3cc8416ec844 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -413,7 +413,7 @@ static int hw_breakpoint_parse(struct perf_event *bp,
int register_perf_hw_breakpoint(struct perf_event *bp)
{
- struct arch_hw_breakpoint hw;
+ struct arch_hw_breakpoint hw = { };
int err;
err = reserve_bp_slot(bp);
@@ -461,7 +461,7 @@ int
modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *attr,
bool check)
{
- struct arch_hw_breakpoint hw;
+ struct arch_hw_breakpoint hw = { };
int err;
err = hw_breakpoint_parse(bp, attr, &hw);