From: AKASHI Takahiro Date: Tue, 24 Sep 2013 09:00:50 +0000 (+0100) Subject: arm64: avoid multiple evaluation of ptr in get_user/put_user() X-Git-Tag: v3.12-rc4~18^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f65c13efef69b6dc908e588f91a133641d8475c;p=pandora-kernel.git 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 [catalin.marinas@arm.com: added __user type annotation and s/optr/__p/] Signed-off-by: Catalin Marinas --- Reading git-diff-tree failed