diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2013-09-24 10:00:50 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-09-25 16:42:21 +0100 |
commit | 1f65c13efef69b6dc908e588f91a133641d8475c (patch) | |
tree | a0d11a91b177acb70c29643b426e9c6834930f68 /kernel/params.c | |
parent | 25804e6a96681d5d2142058948e218999e4f547c (diff) | |
download | linux-1f65c13efef69b6dc908e588f91a133641d8475c.tar.bz2 |
arm64: avoid multiple evaluation of ptr in get_user/put_user()
get_user() is defined as a function macro in arm64, and trace_get_user()
calls it as followed:
get_user(ch, ptr++);
Since the second parameter occurs twice in the definition, 'ptr++' is
unexpectedly evaluated twice and trace_get_user() will generate a bogus
string from user-provided one. As a result, some ftrace sysfs operations,
like "echo FUNCNAME > set_ftrace_filter," hit this case and eventually fail.
This patch fixes the issue both in get_user() and put_user().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
[catalin.marinas@arm.com: added __user type annotation and s/optr/__p/]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'kernel/params.c')
0 files changed, 0 insertions, 0 deletions