Commit 0d1d9244 authored by Sasha Levin's avatar Sasha Levin Committed by Greg Kroah-Hartman

Revert "x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP"

This reverts commit b65b70ba, which was
upstream commit 4a6c91fb.

On Tue, Jun 25, 2019 at 09:39:45AM +0200, Sebastian Andrzej Siewior wrote:
>Please backport commit e74deb11 to
>stable _or_ revert the backport of commit 4a6c91fb ("x86/uaccess,
>ftrace: Fix ftrace_likely_update() vs. SMAP"). It uses
>user_access_{save|restore}() which has been introduced in the following
>commit.
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 507ad93a
...@@ -205,8 +205,6 @@ void trace_likely_condition(struct ftrace_likely_data *f, int val, int expect) ...@@ -205,8 +205,6 @@ void trace_likely_condition(struct ftrace_likely_data *f, int val, int expect)
void ftrace_likely_update(struct ftrace_likely_data *f, int val, void ftrace_likely_update(struct ftrace_likely_data *f, int val,
int expect, int is_constant) int expect, int is_constant)
{ {
unsigned long flags = user_access_save();
/* A constant is always correct */ /* A constant is always correct */
if (is_constant) { if (is_constant) {
f->constant++; f->constant++;
...@@ -225,8 +223,6 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, ...@@ -225,8 +223,6 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
f->data.correct++; f->data.correct++;
else else
f->data.incorrect++; f->data.incorrect++;
user_access_restore(flags);
} }
EXPORT_SYMBOL(ftrace_likely_update); EXPORT_SYMBOL(ftrace_likely_update);
......
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