[linux-stable-rc:linux-4.19.y 9566/9999] drivers/android/binder.c:3739: Error: unrecognized keyword/register name `l.lwz ?ap,4(r19)'
From: kernel test robot
Date: Mon Sep 06 2021 - 06:12:27 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 6c3e013be752bf70e7321d7c813d68eac8ac36b0
commit: e8236726c616d8843bf936e2bafefc2540bb87a7 [9566/9999] arch/openrisc: Fix issues with access_ok()
config: openrisc-randconfig-r003-20210906 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e8236726c616d8843bf936e2bafefc2540bb87a7
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout e8236726c616d8843bf936e2bafefc2540bb87a7
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/android/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/ptrace.h:119:9: note: in expansion of macro 'if'
119 | if (unlikely(task->ptrace))
| ^~
include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/ptrace.h:119:13: note: in expansion of macro 'unlikely'
119 | if (unlikely(task->ptrace))
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/ptrace.h:119:9: note: in expansion of macro 'if'
119 | if (unlikely(task->ptrace))
| ^~
include/linux/ptrace.h: In function 'ptrace_event':
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/ptrace.h:150:9: note: in expansion of macro 'if'
150 | if (unlikely(ptrace_event_enabled(current, event))) {
| ^~
include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/ptrace.h:150:13: note: in expansion of macro 'unlikely'
150 | if (unlikely(ptrace_event_enabled(current, event))) {
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/ptrace.h:150:9: note: in expansion of macro 'if'
150 | if (unlikely(ptrace_event_enabled(current, event))) {
| ^~
include/linux/ptrace.h: In function 'ptrace_init_task':
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/ptrace.h:209:9: note: in expansion of macro 'if'
209 | if (unlikely(ptrace) && current->ptrace) {
| ^~
include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/ptrace.h:209:13: note: in expansion of macro 'unlikely'
209 | if (unlikely(ptrace) && current->ptrace) {
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/ptrace.h:209:9: note: in expansion of macro 'if'
209 | if (unlikely(ptrace) && current->ptrace) {
| ^~
include/linux/cgroup.h: In function 'task_get_css':
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/cgroup.h:509:17: note: in expansion of macro 'if'
509 | if (likely(css_tryget(css)))
| ^~
include/linux/compiler.h:45:26: note: in expansion of macro '__branch_check__'
45 | # define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/cgroup.h:509:21: note: in expansion of macro 'likely'
509 | if (likely(css_tryget(css)))
| ^~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/cgroup.h:509:17: note: in expansion of macro 'if'
509 | if (likely(css_tryget(css)))
| ^~
drivers/android/binder.c: Assembler messages:
>> drivers/android/binder.c:3739: Error: unrecognized keyword/register name `l.lwz ?ap,4(r19)'
drivers/android/binder.c:3744: Error: unrecognized keyword/register name `l.addi ?ap,r0,0'
vim +3739 drivers/android/binder.c
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3325
fb07ebc3e82a98a drivers/staging/android/binder.c Bojan Prtvar 2013-09-02 3326 static int binder_thread_write(struct binder_proc *proc,
fb07ebc3e82a98a drivers/staging/android/binder.c Bojan Prtvar 2013-09-02 3327 struct binder_thread *thread,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3328 binder_uintptr_t binder_buffer, size_t size,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3329 binder_size_t *consumed)
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3330 {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3331 uint32_t cmd;
342e5c90b60134d drivers/android/binder.c Martijn Coenen 2017-02-03 3332 struct binder_context *context = proc->context;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3333 void __user *buffer = (void __user *)(uintptr_t)binder_buffer;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3334 void __user *ptr = buffer + *consumed;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3335 void __user *end = buffer + size;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3336
26549d17741035b drivers/android/binder.c Todd Kjos 2017-06-29 3337 while (ptr < end && thread->return_error.cmd == BR_OK) {
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3338 int ret;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3339
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3340 if (get_user(cmd, (uint32_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3341 return -EFAULT;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3342 ptr += sizeof(uint32_t);
975a1ac9a9fe65d drivers/staging/android/binder.c Arve Hjønnevåg 2012-10-16 3343 trace_binder_command(cmd);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3344 if (_IOC_NR(cmd) < ARRAY_SIZE(binder_stats.bc)) {
0953c7976c36ce0 drivers/android/binder.c Badhri Jagan Sridharan 2017-06-29 3345 atomic_inc(&binder_stats.bc[_IOC_NR(cmd)]);
0953c7976c36ce0 drivers/android/binder.c Badhri Jagan Sridharan 2017-06-29 3346 atomic_inc(&proc->stats.bc[_IOC_NR(cmd)]);
0953c7976c36ce0 drivers/android/binder.c Badhri Jagan Sridharan 2017-06-29 3347 atomic_inc(&thread->stats.bc[_IOC_NR(cmd)]);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3348 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3349 switch (cmd) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3350 case BC_INCREFS:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3351 case BC_ACQUIRE:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3352 case BC_RELEASE:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3353 case BC_DECREFS: {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3354 uint32_t target;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3355 const char *debug_string;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3356 bool strong = cmd == BC_ACQUIRE || cmd == BC_RELEASE;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3357 bool increment = cmd == BC_INCREFS || cmd == BC_ACQUIRE;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3358 struct binder_ref_data rdata;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3359
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3360 if (get_user(target, (uint32_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3361 return -EFAULT;
c44b1231ff11709 drivers/android/binder.c Todd Kjos 2017-06-29 3362
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3363 ptr += sizeof(uint32_t);
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3364 ret = -1;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3365 if (increment && !target) {
c44b1231ff11709 drivers/android/binder.c Todd Kjos 2017-06-29 3366 struct binder_node *ctx_mgr_node;
c44b1231ff11709 drivers/android/binder.c Todd Kjos 2017-06-29 3367 mutex_lock(&context->context_mgr_node_lock);
c44b1231ff11709 drivers/android/binder.c Todd Kjos 2017-06-29 3368 ctx_mgr_node = context->binder_context_mgr_node;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3369 if (ctx_mgr_node)
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3370 ret = binder_inc_ref_for_node(
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3371 proc, ctx_mgr_node,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3372 strong, NULL, &rdata);
c44b1231ff11709 drivers/android/binder.c Todd Kjos 2017-06-29 3373 mutex_unlock(&context->context_mgr_node_lock);
c44b1231ff11709 drivers/android/binder.c Todd Kjos 2017-06-29 3374 }
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3375 if (ret)
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3376 ret = binder_update_ref_for_handle(
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3377 proc, target, increment, strong,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3378 &rdata);
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3379 if (!ret && rdata.desc != target) {
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3380 binder_user_error("%d:%d tried to acquire reference to desc %d, got %d instead\n",
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3381 proc->pid, thread->pid,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3382 target, rdata.desc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3383 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3384 switch (cmd) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3385 case BC_INCREFS:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3386 debug_string = "IncRefs";
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3387 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3388 case BC_ACQUIRE:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3389 debug_string = "Acquire";
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3390 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3391 case BC_RELEASE:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3392 debug_string = "Release";
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3393 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3394 case BC_DECREFS:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3395 default:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3396 debug_string = "DecRefs";
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3397 break;
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3398 }
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3399 if (ret) {
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3400 binder_user_error("%d:%d %s %d refcount change on invalid ref %d ret %d\n",
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3401 proc->pid, thread->pid, debug_string,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3402 strong, target, ret);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3403 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3404 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3405 binder_debug(BINDER_DEBUG_USER_REFS,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3406 "%d:%d %s ref %d desc %d s %d w %d\n",
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3407 proc->pid, thread->pid, debug_string,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3408 rdata.debug_id, rdata.desc, rdata.strong,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3409 rdata.weak);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3410 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3411 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3412 case BC_INCREFS_DONE:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3413 case BC_ACQUIRE_DONE: {
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3414 binder_uintptr_t node_ptr;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3415 binder_uintptr_t cookie;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3416 struct binder_node *node;
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3417 bool free_node;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3418
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3419 if (get_user(node_ptr, (binder_uintptr_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3420 return -EFAULT;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3421 ptr += sizeof(binder_uintptr_t);
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3422 if (get_user(cookie, (binder_uintptr_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3423 return -EFAULT;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3424 ptr += sizeof(binder_uintptr_t);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3425 node = binder_get_node(proc, node_ptr);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3426 if (node == NULL) {
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3427 binder_user_error("%d:%d %s u%016llx no match\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3428 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3429 cmd == BC_INCREFS_DONE ?
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3430 "BC_INCREFS_DONE" :
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3431 "BC_ACQUIRE_DONE",
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3432 (u64)node_ptr);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3433 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3434 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3435 if (cookie != node->cookie) {
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3436 binder_user_error("%d:%d %s u%016llx node %d cookie mismatch %016llx != %016llx\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3437 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3438 cmd == BC_INCREFS_DONE ?
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3439 "BC_INCREFS_DONE" : "BC_ACQUIRE_DONE",
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3440 (u64)node_ptr, node->debug_id,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3441 (u64)cookie, (u64)node->cookie);
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3442 binder_put_node(node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3443 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3444 }
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3445 binder_node_inner_lock(node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3446 if (cmd == BC_ACQUIRE_DONE) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3447 if (node->pending_strong_ref == 0) {
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3448 binder_user_error("%d:%d BC_ACQUIRE_DONE node %d has no pending acquire request\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3449 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3450 node->debug_id);
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3451 binder_node_inner_unlock(node);
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3452 binder_put_node(node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3453 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3454 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3455 node->pending_strong_ref = 0;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3456 } else {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3457 if (node->pending_weak_ref == 0) {
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3458 binder_user_error("%d:%d BC_INCREFS_DONE node %d has no pending increfs request\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3459 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3460 node->debug_id);
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3461 binder_node_inner_unlock(node);
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3462 binder_put_node(node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3463 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3464 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3465 node->pending_weak_ref = 0;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3466 }
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3467 free_node = binder_dec_node_nilocked(node,
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3468 cmd == BC_ACQUIRE_DONE, 0);
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3469 WARN_ON(free_node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3470 binder_debug(BINDER_DEBUG_USER_REFS,
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3471 "%d:%d %s node %d ls %d lw %d tr %d\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3472 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3473 cmd == BC_INCREFS_DONE ? "BC_INCREFS_DONE" : "BC_ACQUIRE_DONE",
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3474 node->debug_id, node->local_strong_refs,
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3475 node->local_weak_refs, node->tmp_refs);
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3476 binder_node_inner_unlock(node);
adc1884222276df drivers/android/binder.c Todd Kjos 2017-06-29 3477 binder_put_node(node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3478 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3479 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3480 case BC_ATTEMPT_ACQUIRE:
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3481 pr_err("BC_ATTEMPT_ACQUIRE not supported\n");
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3482 return -EINVAL;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3483 case BC_ACQUIRE_RESULT:
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3484 pr_err("BC_ACQUIRE_RESULT not supported\n");
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3485 return -EINVAL;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3486
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3487 case BC_FREE_BUFFER: {
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3488 binder_uintptr_t data_ptr;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3489 struct binder_buffer *buffer;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3490
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3491 if (get_user(data_ptr, (binder_uintptr_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3492 return -EFAULT;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3493 ptr += sizeof(binder_uintptr_t);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3494
53d311cfa19ad35 drivers/android/binder.c Todd Kjos 2017-06-29 3495 buffer = binder_alloc_prepare_to_free(&proc->alloc,
19c987241ca1216 drivers/android/binder.c Todd Kjos 2017-06-29 3496 data_ptr);
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3497 if (IS_ERR_OR_NULL(buffer)) {
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3498 if (PTR_ERR(buffer) == -EPERM) {
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3499 binder_user_error(
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3500 "%d:%d BC_FREE_BUFFER u%016llx matched unreturned or currently freeing buffer\n",
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3501 proc->pid, thread->pid,
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3502 (u64)data_ptr);
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3503 } else {
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3504 binder_user_error(
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3505 "%d:%d BC_FREE_BUFFER u%016llx no match\n",
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3506 proc->pid, thread->pid,
553927d6aab993e drivers/android/binder.c Todd Kjos 2018-11-06 3507 (u64)data_ptr);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3508 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3509 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3510 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3511 binder_debug(BINDER_DEBUG_FREE_BUFFER,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3512 "%d:%d BC_FREE_BUFFER u%016llx found buffer %d for %s transaction\n",
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3513 proc->pid, thread->pid, (u64)data_ptr,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3514 buffer->debug_id,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3515 buffer->transaction ? "active" : "finished");
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3516
22068d49d09d2b3 drivers/android/binder.c Todd Kjos 2019-06-12 3517 binder_inner_proc_lock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3518 if (buffer->transaction) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3519 buffer->transaction->buffer = NULL;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3520 buffer->transaction = NULL;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3521 }
22068d49d09d2b3 drivers/android/binder.c Todd Kjos 2019-06-12 3522 binder_inner_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3523 if (buffer->async_transaction && buffer->target_node) {
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3524 struct binder_node *buf_node;
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3525 struct binder_work *w;
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3526
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3527 buf_node = buffer->target_node;
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3528 binder_node_inner_lock(buf_node);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3529 BUG_ON(!buf_node->has_async_transaction);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3530 BUG_ON(buf_node->proc != proc);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3531 w = binder_dequeue_work_head_ilocked(
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3532 &buf_node->async_todo);
3a6430ce462172c drivers/android/binder.c Martijn Coenen 2017-08-31 3533 if (!w) {
197410ad884eb18 drivers/android/binder.c Gustavo A. R. Silva 2018-01-23 3534 buf_node->has_async_transaction = false;
3a6430ce462172c drivers/android/binder.c Martijn Coenen 2017-08-31 3535 } else {
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3536 binder_enqueue_work_ilocked(
3a6430ce462172c drivers/android/binder.c Martijn Coenen 2017-08-31 3537 w, &proc->todo);
3a6430ce462172c drivers/android/binder.c Martijn Coenen 2017-08-31 3538 binder_wakeup_proc_ilocked(proc);
3a6430ce462172c drivers/android/binder.c Martijn Coenen 2017-08-31 3539 }
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3540 binder_node_inner_unlock(buf_node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3541 }
975a1ac9a9fe65d drivers/staging/android/binder.c Arve Hjønnevåg 2012-10-16 3542 trace_binder_transaction_buffer_release(buffer);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3543 binder_transaction_buffer_release(proc, buffer, NULL);
19c987241ca1216 drivers/android/binder.c Todd Kjos 2017-06-29 3544 binder_alloc_free_buf(&proc->alloc, buffer);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3545 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3546 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3547
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3548 case BC_TRANSACTION_SG:
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3549 case BC_REPLY_SG: {
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3550 struct binder_transaction_data_sg tr;
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3551
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3552 if (copy_from_user(&tr, ptr, sizeof(tr)))
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3553 return -EFAULT;
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3554 ptr += sizeof(tr);
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3555 binder_transaction(proc, thread, &tr.transaction_data,
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3556 cmd == BC_REPLY_SG, tr.buffers_size);
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3557 break;
7980240b6d63e06 drivers/android/binder.c Martijn Coenen 2017-02-03 3558 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3559 case BC_TRANSACTION:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3560 case BC_REPLY: {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3561 struct binder_transaction_data tr;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3562
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3563 if (copy_from_user(&tr, ptr, sizeof(tr)))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3564 return -EFAULT;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3565 ptr += sizeof(tr);
4bfac80af3a63f2 drivers/android/binder.c Martijn Coenen 2017-02-03 3566 binder_transaction(proc, thread, &tr,
4bfac80af3a63f2 drivers/android/binder.c Martijn Coenen 2017-02-03 3567 cmd == BC_REPLY, 0);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3568 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3569 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3570
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3571 case BC_REGISTER_LOOPER:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3572 binder_debug(BINDER_DEBUG_THREADS,
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3573 "%d:%d BC_REGISTER_LOOPER\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3574 proc->pid, thread->pid);
b3e6861283790d7 drivers/android/binder.c Todd Kjos 2017-06-29 3575 binder_inner_proc_lock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3576 if (thread->looper & BINDER_LOOPER_STATE_ENTERED) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3577 thread->looper |= BINDER_LOOPER_STATE_INVALID;
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3578 binder_user_error("%d:%d ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3579 proc->pid, thread->pid);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3580 } else if (proc->requested_threads == 0) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3581 thread->looper |= BINDER_LOOPER_STATE_INVALID;
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3582 binder_user_error("%d:%d ERROR: BC_REGISTER_LOOPER called without request\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3583 proc->pid, thread->pid);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3584 } else {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3585 proc->requested_threads--;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3586 proc->requested_threads_started++;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3587 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3588 thread->looper |= BINDER_LOOPER_STATE_REGISTERED;
b3e6861283790d7 drivers/android/binder.c Todd Kjos 2017-06-29 3589 binder_inner_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3590 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3591 case BC_ENTER_LOOPER:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3592 binder_debug(BINDER_DEBUG_THREADS,
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3593 "%d:%d BC_ENTER_LOOPER\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3594 proc->pid, thread->pid);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3595 if (thread->looper & BINDER_LOOPER_STATE_REGISTERED) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3596 thread->looper |= BINDER_LOOPER_STATE_INVALID;
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3597 binder_user_error("%d:%d ERROR: BC_ENTER_LOOPER called after BC_REGISTER_LOOPER\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3598 proc->pid, thread->pid);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3599 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3600 thread->looper |= BINDER_LOOPER_STATE_ENTERED;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3601 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3602 case BC_EXIT_LOOPER:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3603 binder_debug(BINDER_DEBUG_THREADS,
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3604 "%d:%d BC_EXIT_LOOPER\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3605 proc->pid, thread->pid);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3606 thread->looper |= BINDER_LOOPER_STATE_EXITED;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3607 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3608
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3609 case BC_REQUEST_DEATH_NOTIFICATION:
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3610 case BC_CLEAR_DEATH_NOTIFICATION: {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3611 uint32_t target;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3612 binder_uintptr_t cookie;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3613 struct binder_ref *ref;
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3614 struct binder_ref_death *death = NULL;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3615
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3616 if (get_user(target, (uint32_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3617 return -EFAULT;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3618 ptr += sizeof(uint32_t);
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3619 if (get_user(cookie, (binder_uintptr_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3620 return -EFAULT;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3621 ptr += sizeof(binder_uintptr_t);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3622 if (cmd == BC_REQUEST_DEATH_NOTIFICATION) {
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3623 /*
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3624 * Allocate memory for death notification
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3625 * before taking lock
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3626 */
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3627 death = kzalloc(sizeof(*death), GFP_KERNEL);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3628 if (death == NULL) {
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3629 WARN_ON(thread->return_error.cmd !=
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3630 BR_OK);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3631 thread->return_error.cmd = BR_ERROR;
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3632 binder_enqueue_thread_work(
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3633 thread,
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3634 &thread->return_error.work);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3635 binder_debug(
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3636 BINDER_DEBUG_FAILED_TRANSACTION,
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3637 "%d:%d BC_REQUEST_DEATH_NOTIFICATION failed\n",
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3638 proc->pid, thread->pid);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3639 break;
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3640 }
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3641 }
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3642 binder_proc_lock(proc);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3643 ref = binder_get_ref_olocked(proc, target, false);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3644 if (ref == NULL) {
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3645 binder_user_error("%d:%d %s invalid ref %d\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3646 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3647 cmd == BC_REQUEST_DEATH_NOTIFICATION ?
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3648 "BC_REQUEST_DEATH_NOTIFICATION" :
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3649 "BC_CLEAR_DEATH_NOTIFICATION",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3650 target);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3651 binder_proc_unlock(proc);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3652 kfree(death);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3653 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3654 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3655
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3656 binder_debug(BINDER_DEBUG_DEATH_NOTIFICATION,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3657 "%d:%d %s %016llx ref %d desc %d s %d w %d for node %d\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3658 proc->pid, thread->pid,
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3659 cmd == BC_REQUEST_DEATH_NOTIFICATION ?
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3660 "BC_REQUEST_DEATH_NOTIFICATION" :
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3661 "BC_CLEAR_DEATH_NOTIFICATION",
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3662 (u64)cookie, ref->data.debug_id,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3663 ref->data.desc, ref->data.strong,
372e3147df7016e drivers/android/binder.c Todd Kjos 2017-06-29 3664 ref->data.weak, ref->node->debug_id);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3665
ab51ec6bdf0b7af drivers/android/binder.c Martijn Coenen 2017-06-29 3666 binder_node_lock(ref->node);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3667 if (cmd == BC_REQUEST_DEATH_NOTIFICATION) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3668 if (ref->death) {
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3669 binder_user_error("%d:%d BC_REQUEST_DEATH_NOTIFICATION death notification already set\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3670 proc->pid, thread->pid);
ab51ec6bdf0b7af drivers/android/binder.c Martijn Coenen 2017-06-29 3671 binder_node_unlock(ref->node);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3672 binder_proc_unlock(proc);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3673 kfree(death);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3674 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3675 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3676 binder_stats_created(BINDER_STAT_DEATH);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3677 INIT_LIST_HEAD(&death->work.entry);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3678 death->cookie = cookie;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3679 ref->death = death;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3680 if (ref->node->proc == NULL) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3681 ref->death->work.type = BINDER_WORK_DEAD_BINDER;
bb74562a7f83982 drivers/android/binder.c Martijn Coenen 2017-08-31 3682
1b77e9dcc3da935 drivers/android/binder.c Martijn Coenen 2017-08-31 3683 binder_inner_proc_lock(proc);
1b77e9dcc3da935 drivers/android/binder.c Martijn Coenen 2017-08-31 3684 binder_enqueue_work_ilocked(
bb74562a7f83982 drivers/android/binder.c Martijn Coenen 2017-08-31 3685 &ref->death->work, &proc->todo);
bb74562a7f83982 drivers/android/binder.c Martijn Coenen 2017-08-31 3686 binder_wakeup_proc_ilocked(proc);
1b77e9dcc3da935 drivers/android/binder.c Martijn Coenen 2017-08-31 3687 binder_inner_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3688 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3689 } else {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3690 if (ref->death == NULL) {
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3691 binder_user_error("%d:%d BC_CLEAR_DEATH_NOTIFICATION death notification not active\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3692 proc->pid, thread->pid);
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3693 binder_node_unlock(ref->node);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3694 binder_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3695 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3696 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3697 death = ref->death;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3698 if (death->cookie != cookie) {
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3699 binder_user_error("%d:%d BC_CLEAR_DEATH_NOTIFICATION death notification cookie mismatch %016llx != %016llx\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3700 proc->pid, thread->pid,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3701 (u64)death->cookie,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3702 (u64)cookie);
673068eee8560d5 drivers/android/binder.c Todd Kjos 2017-06-29 3703 binder_node_unlock(ref->node);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3704 binder_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3705 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3706 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3707 ref->death = NULL;
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3708 binder_inner_proc_lock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3709 if (list_empty(&death->work.entry)) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3710 death->work.type = BINDER_WORK_CLEAR_DEATH_NOTIFICATION;
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3711 if (thread->looper &
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3712 (BINDER_LOOPER_STATE_REGISTERED |
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3713 BINDER_LOOPER_STATE_ENTERED))
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3714 binder_enqueue_thread_work_ilocked(
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3715 thread,
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3716 &death->work);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3717 else {
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3718 binder_enqueue_work_ilocked(
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3719 &death->work,
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3720 &proc->todo);
1b77e9dcc3da935 drivers/android/binder.c Martijn Coenen 2017-08-31 3721 binder_wakeup_proc_ilocked(
408c68b17aea2f2 drivers/android/binder.c Martijn Coenen 2017-08-31 3722 proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3723 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3724 } else {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3725 BUG_ON(death->work.type != BINDER_WORK_DEAD_BINDER);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3726 death->work.type = BINDER_WORK_DEAD_BINDER_AND_CLEAR;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3727 }
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3728 binder_inner_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3729 }
ab51ec6bdf0b7af drivers/android/binder.c Martijn Coenen 2017-06-29 3730 binder_node_unlock(ref->node);
2c1838dc6817dd2 drivers/android/binder.c Todd Kjos 2017-06-29 3731 binder_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3732 } break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3733 case BC_DEAD_BINDER_DONE: {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3734 struct binder_work *w;
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3735 binder_uintptr_t cookie;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3736 struct binder_ref_death *death = NULL;
10f62861b4a2f22 drivers/staging/android/binder.c Seunghun Lee 2014-05-01 3737
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3738 if (get_user(cookie, (binder_uintptr_t __user *)ptr))
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 @3739 return -EFAULT;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3740
7a64cd887fdb97f drivers/android/binder.c Lisa Du 2016-02-17 3741 ptr += sizeof(cookie);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3742 binder_inner_proc_lock(proc);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3743 list_for_each_entry(w, &proc->delivered_death,
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3744 entry) {
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3745 struct binder_ref_death *tmp_death =
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3746 container_of(w,
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3747 struct binder_ref_death,
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3748 work);
10f62861b4a2f22 drivers/staging/android/binder.c Seunghun Lee 2014-05-01 3749
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3750 if (tmp_death->cookie == cookie) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3751 death = tmp_death;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3752 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3753 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3754 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3755 binder_debug(BINDER_DEBUG_DEAD_BINDER,
8ca86f1639ec589 drivers/android/binder.c Todd Kjos 2018-02-07 3756 "%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n",
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3757 proc->pid, thread->pid, (u64)cookie,
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3758 death);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3759 if (death == NULL) {
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3760 binder_user_error("%d:%d BC_DEAD_BINDER_DONE %016llx not found\n",
da49889deb34d35 drivers/staging/android/binder.c Arve Hjønnevåg 2014-02-21 3761 proc->pid, thread->pid, (u64)cookie);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3762 binder_inner_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3763 break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3764 }
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3765 binder_dequeue_work_ilocked(&death->work);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3766 if (death->work.type == BINDER_WORK_DEAD_BINDER_AND_CLEAR) {
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3767 death->work.type = BINDER_WORK_CLEAR_DEATH_NOTIFICATION;
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3768 if (thread->looper &
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3769 (BINDER_LOOPER_STATE_REGISTERED |
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3770 BINDER_LOOPER_STATE_ENTERED))
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3771 binder_enqueue_thread_work_ilocked(
148ade2c4d4f46b drivers/android/binder.c Martijn Coenen 2017-11-15 3772 thread, &death->work);
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3773 else {
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3774 binder_enqueue_work_ilocked(
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3775 &death->work,
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3776 &proc->todo);
408c68b17aea2f2 drivers/android/binder.c Martijn Coenen 2017-08-31 3777 binder_wakeup_proc_ilocked(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3778 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3779 }
72196393a5e3d28 drivers/android/binder.c Todd Kjos 2017-06-29 3780 binder_inner_proc_unlock(proc);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3781 } break;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3782
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3783 default:
56b468fc709b2b9 drivers/staging/android/binder.c Anmol Sarma 2012-10-30 3784 pr_err("%d:%d unknown command %d\n",
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3785 proc->pid, thread->pid, cmd);
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3786 return -EINVAL;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3787 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3788 *consumed = ptr - buffer;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3789 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3790 return 0;
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3791 }
355b0502f6efea0 drivers/staging/android/binder.c Greg Kroah-Hartman 2011-11-30 3792
:::::: The code at line 3739 was first introduced by commit
:::::: 355b0502f6efea0ff9492753888772c96972d2a3 Revert "Staging: android: delete android drivers"
:::::: TO: Greg Kroah-Hartman <gregkh@xxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip