projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tracing: Have preempt(irqs)off trace preempt disabled functions
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
kernel
/
kcmp.c
diff --git
a/kernel/kcmp.c
b/kernel/kcmp.c
index e30ac0fe61c3ded5533cb4db8e95b2d41dcf2ac8..3a47fa998fe07277c592f62de36f59dad0d09f8b 100644
(file)
--- a/
kernel/kcmp.c
+++ b/
kernel/kcmp.c
@@
-44,11
+44,12
@@
static long kptr_obfuscate(long v, int type)
*/
static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type)
{
*/
static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type)
{
- long
ret
;
+ long
t1, t2
;
- ret = kptr_obfuscate((long)v1, type) - kptr_obfuscate((long)v2, type);
+ t1 = kptr_obfuscate((long)v1, type);
+ t2 = kptr_obfuscate((long)v2, type);
- return (
ret < 0) | ((ret > 0
) << 1);
+ return (
t1 < t2) | ((t1 > t2
) << 1);
}
/* The caller must have pinned the task */
}
/* The caller must have pinned the task */
@@
-121,8
+122,8
@@
SYSCALL_DEFINE5(kcmp, pid_t, pid1, pid_t, pid2, int, type,
&task2->signal->cred_guard_mutex);
if (ret)
goto err;
&task2->signal->cred_guard_mutex);
if (ret)
goto err;
- if (!ptrace_may_access(task1, PTRACE_MODE_READ) ||
- !ptrace_may_access(task2, PTRACE_MODE_READ)) {
+ if (!ptrace_may_access(task1, PTRACE_MODE_READ
_REALCREDS
) ||
+ !ptrace_may_access(task2, PTRACE_MODE_READ
_REALCREDS
)) {
ret = -EPERM;
goto err_unlock;
}
ret = -EPERM;
goto err_unlock;
}