[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180809120305.20693-5-jolsa@kernel.org>
Date: Thu, 9 Aug 2018 14:03:04 +0200
From: Jiri Olsa <jolsa@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
David Ahern <dsahern@...il.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Milind Chabbi <chabbi.milind@...il.com>,
Oleg Nesterov <oleg@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>
Subject: [PATCH 4/5] perf/hw_breakpoint: Set breakpoint as disabled in modify_user_hw_breakpoint error path
When we failed to modify breakpoint, we ended up with
disabled event. Mirror that in its 'attr.disabled',
because some parts of the ptrace code depends on it.
Link: http://lkml.kernel.org/n/tip-rp81jgq4rx19ozxm9decxq98@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
kernel/events/hw_breakpoint.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index 3e560d7609fd..eff7ab716139 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -523,8 +523,10 @@ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *att
perf_event_disable(bp);
err = modify_user_hw_breakpoint_check(bp, attr, false);
- if (err)
+ if (err) {
+ bp->attr.disabled = 1;
return err;
+ }
if (!attr->disabled)
perf_event_enable(bp);
--
2.17.1
Powered by blists - more mailing lists