Lines Matching refs:proc
92 DEFINE_SHOW_ATTRIBUTE(proc);
217 #define binder_proc_lock(proc) _binder_proc_lock(proc, __LINE__) argument
219 _binder_proc_lock(struct binder_proc *proc, int line) in _binder_proc_lock() argument
220 __acquires(&proc->outer_lock) in _binder_proc_lock()
224 spin_lock(&proc->outer_lock); in _binder_proc_lock()
235 _binder_proc_unlock(struct binder_proc *proc, int line) in _binder_proc_unlock() argument
236 __releases(&proc->outer_lock) in _binder_proc_unlock()
240 spin_unlock(&proc->outer_lock); in _binder_proc_unlock()
249 #define binder_inner_proc_lock(proc) _binder_inner_proc_lock(proc, __LINE__) argument
251 _binder_inner_proc_lock(struct binder_proc *proc, int line) in _binder_inner_proc_lock() argument
252 __acquires(&proc->inner_lock) in _binder_inner_proc_lock()
256 spin_lock(&proc->inner_lock); in _binder_inner_proc_lock()
265 #define binder_inner_proc_unlock(proc) _binder_inner_proc_unlock(proc, __LINE__) argument
267 _binder_inner_proc_unlock(struct binder_proc *proc, int line) in _binder_inner_proc_unlock() argument
268 __releases(&proc->inner_lock) in _binder_inner_proc_unlock()
272 spin_unlock(&proc->inner_lock); in _binder_inner_proc_unlock()
317 __acquires(&node->lock) __acquires(&node->proc->inner_lock) in _binder_node_inner_lock()
322 if (node->proc) in _binder_node_inner_lock()
323 binder_inner_proc_lock(node->proc); in _binder_node_inner_lock()
326 __acquire(&node->proc->inner_lock); in _binder_node_inner_lock()
338 __releases(&node->lock) __releases(&node->proc->inner_lock) in _binder_node_inner_unlock()
340 struct binder_proc *proc = node->proc; in _binder_node_inner_unlock() local
344 if (proc) in _binder_node_inner_unlock()
345 binder_inner_proc_unlock(proc); in _binder_node_inner_unlock()
348 __release(&node->proc->inner_lock); in _binder_node_inner_unlock()
364 static bool binder_worklist_empty(struct binder_proc *proc, in binder_worklist_empty() argument
369 binder_inner_proc_lock(proc); in binder_worklist_empty()
371 binder_inner_proc_unlock(proc); in binder_worklist_empty()
444 binder_inner_proc_lock(thread->proc); in binder_enqueue_thread_work()
446 binder_inner_proc_unlock(thread->proc); in binder_enqueue_thread_work()
464 binder_dequeue_work(struct binder_proc *proc, struct binder_work *work) in binder_dequeue_work() argument
466 binder_inner_proc_lock(proc); in binder_dequeue_work()
468 binder_inner_proc_unlock(proc); in binder_dequeue_work()
483 binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer);
485 static void binder_free_proc(struct binder_proc *proc);
494 !binder_worklist_empty_ilocked(&thread->proc->todo)); in binder_has_work_ilocked()
501 binder_inner_proc_lock(thread->proc); in binder_has_work()
503 binder_inner_proc_unlock(thread->proc); in binder_has_work()
516 static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc, in binder_wakeup_poll_threads_ilocked() argument
522 for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) { in binder_wakeup_poll_threads_ilocked()
547 binder_select_thread_ilocked(struct binder_proc *proc) in binder_select_thread_ilocked() argument
551 assert_spin_locked(&proc->inner_lock); in binder_select_thread_ilocked()
552 thread = list_first_entry_or_null(&proc->waiting_threads, in binder_select_thread_ilocked()
578 static void binder_wakeup_thread_ilocked(struct binder_proc *proc, in binder_wakeup_thread_ilocked() argument
582 assert_spin_locked(&proc->inner_lock); in binder_wakeup_thread_ilocked()
605 binder_wakeup_poll_threads_ilocked(proc, sync); in binder_wakeup_thread_ilocked()
608 static void binder_wakeup_proc_ilocked(struct binder_proc *proc) in binder_wakeup_proc_ilocked() argument
610 struct binder_thread *thread = binder_select_thread_ilocked(proc); in binder_wakeup_proc_ilocked()
612 binder_wakeup_thread_ilocked(proc, thread, /* sync = */false); in binder_wakeup_proc_ilocked()
633 static struct binder_node *binder_get_node_ilocked(struct binder_proc *proc, in binder_get_node_ilocked() argument
636 struct rb_node *n = proc->nodes.rb_node; in binder_get_node_ilocked()
639 assert_spin_locked(&proc->inner_lock); in binder_get_node_ilocked()
661 static struct binder_node *binder_get_node(struct binder_proc *proc, in binder_get_node() argument
666 binder_inner_proc_lock(proc); in binder_get_node()
667 node = binder_get_node_ilocked(proc, ptr); in binder_get_node()
668 binder_inner_proc_unlock(proc); in binder_get_node()
673 struct binder_proc *proc, in binder_init_node_ilocked() argument
677 struct rb_node **p = &proc->nodes.rb_node; in binder_init_node_ilocked()
684 assert_spin_locked(&proc->inner_lock); in binder_init_node_ilocked()
709 rb_insert_color(&node->rb_node, &proc->nodes); in binder_init_node_ilocked()
711 node->proc = proc; in binder_init_node_ilocked()
723 proc->pid, current->pid, node->debug_id, in binder_init_node_ilocked()
729 static struct binder_node *binder_new_node(struct binder_proc *proc, in binder_new_node() argument
737 binder_inner_proc_lock(proc); in binder_new_node()
738 node = binder_init_node_ilocked(proc, new_node, fp); in binder_new_node()
739 binder_inner_proc_unlock(proc); in binder_new_node()
759 struct binder_proc *proc = node->proc; in binder_inc_node_nilocked() local
762 if (proc) in binder_inc_node_nilocked()
763 assert_spin_locked(&proc->inner_lock); in binder_inc_node_nilocked()
768 !(node->proc && in binder_inc_node_nilocked()
769 node == node->proc->context->binder_context_mgr_node && in binder_inc_node_nilocked()
819 struct binder_proc *proc = node->proc; in binder_dec_node_nilocked() local
822 if (proc) in binder_dec_node_nilocked()
823 assert_spin_locked(&proc->inner_lock); in binder_dec_node_nilocked()
839 if (proc && (node->has_strong_ref || node->has_weak_ref)) { in binder_dec_node_nilocked()
841 binder_enqueue_work_ilocked(&node->work, &proc->todo); in binder_dec_node_nilocked()
842 binder_wakeup_proc_ilocked(proc); in binder_dec_node_nilocked()
847 if (proc) { in binder_dec_node_nilocked()
849 rb_erase(&node->rb_node, &proc->nodes); in binder_dec_node_nilocked()
913 if (node->proc) in binder_inc_node_tmpref()
914 binder_inner_proc_lock(node->proc); in binder_inc_node_tmpref()
918 if (node->proc) in binder_inc_node_tmpref()
919 binder_inner_proc_unlock(node->proc); in binder_inc_node_tmpref()
936 if (!node->proc) in binder_dec_node_tmpref()
942 if (!node->proc) in binder_dec_node_tmpref()
963 static struct binder_ref *binder_get_ref_olocked(struct binder_proc *proc, in binder_get_ref_olocked() argument
966 struct rb_node *n = proc->refs_by_desc.rb_node; in binder_get_ref_olocked()
1005 struct binder_proc *proc, in binder_get_ref_for_node_olocked() argument
1009 struct binder_context *context = proc->context; in binder_get_ref_for_node_olocked()
1010 struct rb_node **p = &proc->refs_by_node.rb_node; in binder_get_ref_for_node_olocked()
1031 new_ref->proc = proc; in binder_get_ref_for_node_olocked()
1034 rb_insert_color(&new_ref->rb_node_node, &proc->refs_by_node); in binder_get_ref_for_node_olocked()
1037 for (n = rb_first(&proc->refs_by_desc); n != NULL; n = rb_next(n)) { in binder_get_ref_for_node_olocked()
1044 p = &proc->refs_by_desc.rb_node; in binder_get_ref_for_node_olocked()
1057 rb_insert_color(&new_ref->rb_node_desc, &proc->refs_by_desc); in binder_get_ref_for_node_olocked()
1064 proc->pid, new_ref->data.debug_id, new_ref->data.desc, in binder_get_ref_for_node_olocked()
1076 ref->proc->pid, ref->data.debug_id, ref->data.desc, in binder_cleanup_ref_olocked()
1079 rb_erase(&ref->rb_node_desc, &ref->proc->refs_by_desc); in binder_cleanup_ref_olocked()
1080 rb_erase(&ref->rb_node_node, &ref->proc->refs_by_node); in binder_cleanup_ref_olocked()
1104 ref->proc->pid, ref->data.debug_id, in binder_cleanup_ref_olocked()
1106 binder_dequeue_work(ref->proc, &ref->death->work); in binder_cleanup_ref_olocked()
1159 ref->proc->pid, ref->data.debug_id, in binder_dec_ref_olocked()
1170 ref->proc->pid, ref->data.debug_id, in binder_dec_ref_olocked()
1196 struct binder_proc *proc, in binder_get_node_from_ref() argument
1203 binder_proc_lock(proc); in binder_get_node_from_ref()
1204 ref = binder_get_ref_olocked(proc, desc, need_strong_ref); in binder_get_node_from_ref()
1215 binder_proc_unlock(proc); in binder_get_node_from_ref()
1220 binder_proc_unlock(proc); in binder_get_node_from_ref()
1252 static int binder_update_ref_for_handle(struct binder_proc *proc, in binder_update_ref_for_handle() argument
1260 binder_proc_lock(proc); in binder_update_ref_for_handle()
1261 ref = binder_get_ref_olocked(proc, desc, strong); in binder_update_ref_for_handle()
1273 binder_proc_unlock(proc); in binder_update_ref_for_handle()
1280 binder_proc_unlock(proc); in binder_update_ref_for_handle()
1295 static int binder_dec_ref_for_handle(struct binder_proc *proc, in binder_dec_ref_for_handle() argument
1298 return binder_update_ref_for_handle(proc, desc, false, strong, rdata); in binder_dec_ref_for_handle()
1315 static int binder_inc_ref_for_node(struct binder_proc *proc, in binder_inc_ref_for_node() argument
1325 binder_proc_lock(proc); in binder_inc_ref_for_node()
1326 ref = binder_get_ref_for_node_olocked(proc, node, NULL); in binder_inc_ref_for_node()
1328 binder_proc_unlock(proc); in binder_inc_ref_for_node()
1332 binder_proc_lock(proc); in binder_inc_ref_for_node()
1333 ref = binder_get_ref_for_node_olocked(proc, node, new_ref); in binder_inc_ref_for_node()
1337 binder_proc_unlock(proc); in binder_inc_ref_for_node()
1351 assert_spin_locked(&target_thread->proc->inner_lock); in binder_pop_transaction_ilocked()
1377 binder_inner_proc_lock(thread->proc); in binder_thread_dec_tmpref()
1380 binder_inner_proc_unlock(thread->proc); in binder_thread_dec_tmpref()
1384 binder_inner_proc_unlock(thread->proc); in binder_thread_dec_tmpref()
1399 static void binder_proc_dec_tmpref(struct binder_proc *proc) in binder_proc_dec_tmpref() argument
1401 binder_inner_proc_lock(proc); in binder_proc_dec_tmpref()
1402 proc->tmp_ref--; in binder_proc_dec_tmpref()
1403 if (proc->is_dead && RB_EMPTY_ROOT(&proc->threads) && in binder_proc_dec_tmpref()
1404 !proc->tmp_ref) { in binder_proc_dec_tmpref()
1405 binder_inner_proc_unlock(proc); in binder_proc_dec_tmpref()
1406 binder_free_proc(proc); in binder_proc_dec_tmpref()
1409 binder_inner_proc_unlock(proc); in binder_proc_dec_tmpref()
1448 __acquires(&t->from->proc->inner_lock) in binder_get_txn_from_and_acq_inner()
1454 __acquire(&from->proc->inner_lock); in binder_get_txn_from_and_acq_inner()
1457 binder_inner_proc_lock(from->proc); in binder_get_txn_from_and_acq_inner()
1462 binder_inner_proc_unlock(from->proc); in binder_get_txn_from_and_acq_inner()
1463 __acquire(&from->proc->inner_lock); in binder_get_txn_from_and_acq_inner()
1494 from_proc = t->from ? t->from->proc->pid : 0; in binder_txn_latency_free()
1543 target_thread->proc->pid, in binder_send_failed_reply()
1563 binder_inner_proc_unlock(target_thread->proc); in binder_send_failed_reply()
1568 __release(&target_thread->proc->inner_lock); in binder_send_failed_reply()
1619 static size_t binder_get_object(struct binder_proc *proc, in binder_get_object() argument
1630 binder_alloc_copy_from_buffer(&proc->alloc, object, buffer, in binder_get_object()
1685 struct binder_proc *proc, in binder_validate_ptr() argument
1701 if (binder_alloc_copy_from_buffer(&proc->alloc, &object_offset, in binder_validate_ptr()
1705 object_size = binder_get_object(proc, b, object_offset, object); in binder_validate_ptr()
1753 static bool binder_validate_fixup(struct binder_proc *proc, in binder_validate_fixup() argument
1770 size_t object_size = binder_get_object(proc, b, last_obj_offset, in binder_validate_fixup()
1785 if (binder_alloc_copy_from_buffer(&proc->alloc, in binder_validate_fixup()
1854 static void binder_transaction_buffer_release(struct binder_proc *proc, in binder_transaction_buffer_release() argument
1865 proc->pid, buffer->debug_id, in binder_transaction_buffer_release()
1882 if (!binder_alloc_copy_from_buffer(&proc->alloc, &object_offset, in binder_transaction_buffer_release()
1885 object_size = binder_get_object(proc, buffer, in binder_transaction_buffer_release()
1900 node = binder_get_node(proc, fp->binder); in binder_transaction_buffer_release()
1920 ret = binder_dec_ref_for_handle(proc, fp->handle, in binder_transaction_buffer_release()
1970 parent = binder_validate_ptr(proc, buffer, &ptr_object, in binder_transaction_buffer_release()
2011 &proc->alloc, &fd, buffer, in binder_transaction_buffer_release()
2039 struct binder_proc *proc = thread->proc; in binder_translate_binder() local
2044 node = binder_get_node(proc, fp->binder); in binder_translate_binder()
2046 node = binder_new_node(proc, fp); in binder_translate_binder()
2052 proc->pid, thread->pid, (u64)fp->binder, in binder_translate_binder()
2058 if (security_binder_transfer_binder(proc->cred, target_proc->cred)) { in binder_translate_binder()
2091 struct binder_proc *proc = thread->proc; in binder_translate_handle() local
2097 node = binder_get_node_from_ref(proc, fp->handle, in binder_translate_handle()
2101 proc->pid, thread->pid, fp->handle); in binder_translate_handle()
2104 if (security_binder_transfer_binder(proc->cred, target_proc->cred)) { in binder_translate_handle()
2110 if (node->proc == target_proc) { in binder_translate_handle()
2117 if (node->proc) in binder_translate_handle()
2118 binder_inner_proc_lock(node->proc); in binder_translate_handle()
2120 __acquire(&node->proc->inner_lock); in binder_translate_handle()
2124 if (node->proc) in binder_translate_handle()
2125 binder_inner_proc_unlock(node->proc); in binder_translate_handle()
2127 __release(&node->proc->inner_lock); in binder_translate_handle()
2165 struct binder_proc *proc = thread->proc; in binder_translate_fd() local
2178 proc->pid, thread->pid, in binder_translate_fd()
2188 proc->pid, thread->pid, fd); in binder_translate_fd()
2192 ret = security_binder_transfer_file(proc->cred, target_proc->cred, file); in binder_translate_fd()
2231 struct binder_proc *proc = thread->proc; in binder_translate_fd_array() local
2237 proc->pid, thread->pid, (u64)fda->num_fds); in binder_translate_fd_array()
2244 proc->pid, thread->pid, (u64)fda->num_fds); in binder_translate_fd_array()
2258 proc->pid, thread->pid); in binder_translate_fd_array()
2288 struct binder_proc *proc = thread->proc; in binder_fixup_parent() local
2302 proc->pid, thread->pid); in binder_fixup_parent()
2311 proc->pid, thread->pid); in binder_fixup_parent()
2319 proc->pid, thread->pid); in binder_fixup_parent()
2327 proc->pid, thread->pid); in binder_fixup_parent()
2353 struct binder_proc *proc, in binder_proc_transaction() argument
2370 binder_inner_proc_lock(proc); in binder_proc_transaction()
2371 if (proc->is_frozen) { in binder_proc_transaction()
2372 proc->sync_recv |= !oneway; in binder_proc_transaction()
2373 proc->async_recv |= oneway; in binder_proc_transaction()
2376 if ((proc->is_frozen && !oneway) || proc->is_dead || in binder_proc_transaction()
2378 binder_inner_proc_unlock(proc); in binder_proc_transaction()
2380 return proc->is_frozen ? BR_FROZEN_REPLY : BR_DEAD_REPLY; in binder_proc_transaction()
2384 thread = binder_select_thread_ilocked(proc); in binder_proc_transaction()
2389 binder_enqueue_work_ilocked(&t->work, &proc->todo); in binder_proc_transaction()
2394 binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */); in binder_proc_transaction()
2396 proc->outstanding_txns++; in binder_proc_transaction()
2397 binder_inner_proc_unlock(proc); in binder_proc_transaction()
2432 if (node->proc) { in binder_get_node_refs_for_txn()
2436 node->proc->tmp_ref++; in binder_get_node_refs_for_txn()
2437 *procp = node->proc; in binder_get_node_refs_for_txn()
2445 static void binder_transaction(struct binder_proc *proc, in binder_transaction() argument
2468 struct binder_context *context = proc->context; in binder_transaction()
2476 e->from_proc = proc->pid; in binder_transaction()
2481 strscpy(e->context_name, proc->context->name, BINDERFS_MAX_NAME); in binder_transaction()
2484 binder_inner_proc_lock(proc); in binder_transaction()
2487 binder_inner_proc_unlock(proc); in binder_transaction()
2489 proc->pid, thread->pid); in binder_transaction()
2498 proc->pid, thread->pid, in_reply_to->debug_id, in binder_transaction()
2504 binder_inner_proc_unlock(proc); in binder_transaction()
2512 binder_inner_proc_unlock(proc); in binder_transaction()
2517 __release(&target_thread->proc->inner_lock); in binder_transaction()
2524 proc->pid, thread->pid, in binder_transaction()
2528 binder_inner_proc_unlock(target_thread->proc); in binder_transaction()
2536 target_proc = target_thread->proc; in binder_transaction()
2538 binder_inner_proc_unlock(target_thread->proc); in binder_transaction()
2550 binder_proc_lock(proc); in binder_transaction()
2551 ref = binder_get_ref_olocked(proc, tr->target.handle, in binder_transaction()
2559 proc->pid, thread->pid, tr->target.handle); in binder_transaction()
2562 binder_proc_unlock(proc); in binder_transaction()
2573 if (target_node && target_proc->pid == proc->pid) { in binder_transaction()
2575 proc->pid, thread->pid); in binder_transaction()
2591 if (WARN_ON(proc == target_proc)) { in binder_transaction()
2597 if (security_binder_transaction(proc->cred, in binder_transaction()
2604 binder_inner_proc_lock(proc); in binder_transaction()
2620 proc->pid, thread->pid); in binder_transaction()
2621 binder_inner_proc_unlock(proc); in binder_transaction()
2635 proc->pid, thread->pid, tmp->debug_id, in binder_transaction()
2640 binder_inner_proc_unlock(proc); in binder_transaction()
2651 if (from && from->proc == target_proc) { in binder_transaction()
2661 binder_inner_proc_unlock(proc); in binder_transaction()
2693 proc->pid, thread->pid, t->debug_id, in binder_transaction()
2702 proc->pid, thread->pid, t->debug_id, in binder_transaction()
2713 t->sender_euid = task_euid(proc->tsk); in binder_transaction()
2724 security_cred_getsecid(proc->cred, &secid); in binder_transaction()
2790 proc->pid, thread->pid); in binder_transaction()
2804 proc->pid, thread->pid); in binder_transaction()
2812 proc->pid, thread->pid, (u64)tr->offsets_size); in binder_transaction()
2820 proc->pid, thread->pid, in binder_transaction()
2855 proc->pid, thread->pid, in binder_transaction()
2938 proc->pid, thread->pid); in binder_transaction()
2951 proc->pid, thread->pid); in binder_transaction()
2977 proc->pid, thread->pid); in binder_transaction()
2991 proc->pid, thread->pid); in binder_transaction()
3024 proc->pid, thread->pid, hdr->type); in binder_transaction()
3054 binder_inner_proc_lock(proc); in binder_transaction()
3066 binder_inner_proc_unlock(proc); in binder_transaction()
3070 binder_inner_proc_lock(proc); in binder_transaction()
3072 binder_inner_proc_unlock(proc); in binder_transaction()
3098 binder_dequeue_work(proc, tcomplete); in binder_transaction()
3142 proc->pid, thread->pid, return_error, return_error_param, in binder_transaction()
3186 binder_free_buf(struct binder_proc *proc, in binder_free_buf() argument
3190 binder_inner_proc_lock(proc); in binder_free_buf()
3195 binder_inner_proc_unlock(proc); in binder_free_buf()
3203 BUG_ON(buf_node->proc != proc); in binder_free_buf()
3210 w, &proc->todo); in binder_free_buf()
3211 binder_wakeup_proc_ilocked(proc); in binder_free_buf()
3216 binder_transaction_buffer_release(proc, thread, buffer, 0, is_failure); in binder_free_buf()
3217 binder_alloc_free_buf(&proc->alloc, buffer); in binder_free_buf()
3220 static int binder_thread_write(struct binder_proc *proc, in binder_thread_write() argument
3226 struct binder_context *context = proc->context; in binder_thread_write()
3240 atomic_inc(&proc->stats.bc[_IOC_NR(cmd)]); in binder_thread_write()
3265 if (ctx_mgr_node->proc == proc) { in binder_thread_write()
3267 proc->pid, thread->pid); in binder_thread_write()
3272 proc, ctx_mgr_node, in binder_thread_write()
3279 proc, target, increment, strong, in binder_thread_write()
3283 proc->pid, thread->pid, in binder_thread_write()
3303 proc->pid, thread->pid, debug_string, in binder_thread_write()
3309 proc->pid, thread->pid, debug_string, in binder_thread_write()
3327 node = binder_get_node(proc, node_ptr); in binder_thread_write()
3330 proc->pid, thread->pid, in binder_thread_write()
3339 proc->pid, thread->pid, in binder_thread_write()
3351 proc->pid, thread->pid, in binder_thread_write()
3361 proc->pid, thread->pid, in binder_thread_write()
3374 proc->pid, thread->pid, in binder_thread_write()
3397 buffer = binder_alloc_prepare_to_free(&proc->alloc, in binder_thread_write()
3403 proc->pid, thread->pid, in binder_thread_write()
3408 proc->pid, thread->pid, in binder_thread_write()
3415 proc->pid, thread->pid, (u64)data_ptr, in binder_thread_write()
3418 binder_free_buf(proc, thread, buffer, false); in binder_thread_write()
3429 binder_transaction(proc, thread, &tr.transaction_data, in binder_thread_write()
3440 binder_transaction(proc, thread, &tr, in binder_thread_write()
3448 proc->pid, thread->pid); in binder_thread_write()
3449 binder_inner_proc_lock(proc); in binder_thread_write()
3453 proc->pid, thread->pid); in binder_thread_write()
3454 } else if (proc->requested_threads == 0) { in binder_thread_write()
3457 proc->pid, thread->pid); in binder_thread_write()
3459 proc->requested_threads--; in binder_thread_write()
3460 proc->requested_threads_started++; in binder_thread_write()
3463 binder_inner_proc_unlock(proc); in binder_thread_write()
3468 proc->pid, thread->pid); in binder_thread_write()
3472 proc->pid, thread->pid); in binder_thread_write()
3479 proc->pid, thread->pid); in binder_thread_write()
3512 proc->pid, thread->pid); in binder_thread_write()
3516 binder_proc_lock(proc); in binder_thread_write()
3517 ref = binder_get_ref_olocked(proc, target, false); in binder_thread_write()
3520 proc->pid, thread->pid, in binder_thread_write()
3525 binder_proc_unlock(proc); in binder_thread_write()
3532 proc->pid, thread->pid, in binder_thread_write()
3544 proc->pid, thread->pid); in binder_thread_write()
3546 binder_proc_unlock(proc); in binder_thread_write()
3554 if (ref->node->proc == NULL) { in binder_thread_write()
3557 binder_inner_proc_lock(proc); in binder_thread_write()
3559 &ref->death->work, &proc->todo); in binder_thread_write()
3560 binder_wakeup_proc_ilocked(proc); in binder_thread_write()
3561 binder_inner_proc_unlock(proc); in binder_thread_write()
3566 proc->pid, thread->pid); in binder_thread_write()
3568 binder_proc_unlock(proc); in binder_thread_write()
3574 proc->pid, thread->pid, in binder_thread_write()
3578 binder_proc_unlock(proc); in binder_thread_write()
3582 binder_inner_proc_lock(proc); in binder_thread_write()
3594 &proc->todo); in binder_thread_write()
3596 proc); in binder_thread_write()
3602 binder_inner_proc_unlock(proc); in binder_thread_write()
3605 binder_proc_unlock(proc); in binder_thread_write()
3616 binder_inner_proc_lock(proc); in binder_thread_write()
3617 list_for_each_entry(w, &proc->delivered_death, in binder_thread_write()
3631 proc->pid, thread->pid, (u64)cookie, in binder_thread_write()
3635 proc->pid, thread->pid, (u64)cookie); in binder_thread_write()
3636 binder_inner_proc_unlock(proc); in binder_thread_write()
3650 &proc->todo); in binder_thread_write()
3651 binder_wakeup_proc_ilocked(proc); in binder_thread_write()
3654 binder_inner_proc_unlock(proc); in binder_thread_write()
3659 proc->pid, thread->pid, cmd); in binder_thread_write()
3667 static void binder_stat_br(struct binder_proc *proc, in binder_stat_br() argument
3673 atomic_inc(&proc->stats.br[_IOC_NR(cmd)]); in binder_stat_br()
3678 static int binder_put_node_cmd(struct binder_proc *proc, in binder_put_node_cmd() argument
3700 binder_stat_br(proc, thread, cmd); in binder_put_node_cmd()
3702 proc->pid, thread->pid, cmd_name, node_debug_id, in binder_put_node_cmd()
3713 struct binder_proc *proc = thread->proc; in binder_wait_for_work() local
3717 binder_inner_proc_lock(proc); in binder_wait_for_work()
3724 &proc->waiting_threads); in binder_wait_for_work()
3725 binder_inner_proc_unlock(proc); in binder_wait_for_work()
3727 binder_inner_proc_lock(proc); in binder_wait_for_work()
3735 binder_inner_proc_unlock(proc); in binder_wait_for_work()
3755 static int binder_apply_fd_fixups(struct binder_proc *proc, in binder_apply_fd_fixups() argument
3777 if (binder_alloc_copy_to_buffer(&proc->alloc, t->buffer, in binder_apply_fd_fixups()
3791 err = binder_alloc_copy_from_buffer(&proc->alloc, &fd, in binder_apply_fd_fixups()
3806 static int binder_thread_read(struct binder_proc *proc, in binder_thread_read() argument
3825 binder_inner_proc_lock(proc); in binder_thread_read()
3827 binder_inner_proc_unlock(proc); in binder_thread_read()
3833 !binder_worklist_empty(proc, &thread->todo)); in binder_thread_read()
3838 proc->pid, thread->pid, thread->looper); in binder_thread_read()
3842 binder_set_nice(proc->default_priority); in binder_thread_read()
3867 binder_inner_proc_lock(proc); in binder_thread_read()
3870 else if (!binder_worklist_empty_ilocked(&proc->todo) && in binder_thread_read()
3872 list = &proc->todo; in binder_thread_read()
3874 binder_inner_proc_unlock(proc); in binder_thread_read()
3883 binder_inner_proc_unlock(proc); in binder_thread_read()
3892 binder_inner_proc_unlock(proc); in binder_thread_read()
3900 binder_inner_proc_unlock(proc); in binder_thread_read()
3907 binder_stat_br(proc, thread, cmd); in binder_thread_read()
3911 if (proc->oneway_spam_detection_enabled && in binder_thread_read()
3916 binder_inner_proc_unlock(proc); in binder_thread_read()
3923 binder_stat_br(proc, thread, cmd); in binder_thread_read()
3926 proc->pid, thread->pid); in binder_thread_read()
3938 BUG_ON(proc != node->proc); in binder_thread_read()
3964 proc->pid, thread->pid, in binder_thread_read()
3968 rb_erase(&node->rb_node, &proc->nodes); in binder_thread_read()
3969 binder_inner_proc_unlock(proc); in binder_thread_read()
3983 binder_inner_proc_unlock(proc); in binder_thread_read()
3987 proc, thread, &ptr, node_ptr, in binder_thread_read()
3992 proc, thread, &ptr, node_ptr, in binder_thread_read()
3997 proc, thread, &ptr, node_ptr, in binder_thread_read()
4002 proc, thread, &ptr, node_ptr, in binder_thread_read()
4008 proc->pid, thread->pid, in binder_thread_read()
4031 proc->pid, thread->pid, in binder_thread_read()
4037 binder_inner_proc_unlock(proc); in binder_thread_read()
4042 w, &proc->delivered_death); in binder_thread_read()
4043 binder_inner_proc_unlock(proc); in binder_thread_read()
4052 binder_stat_br(proc, thread, cmd); in binder_thread_read()
4057 binder_inner_proc_unlock(proc); in binder_thread_read()
4059 proc->pid, thread->pid, w->type); in binder_thread_read()
4091 struct task_struct *sender = t_from->proc->tsk; in binder_thread_read()
4100 ret = binder_apply_fd_fixups(proc, t); in binder_thread_read()
4111 binder_free_buf(proc, thread, buffer, true); in binder_thread_read()
4114 proc->pid, thread->pid, in binder_thread_read()
4123 binder_stat_br(proc, thread, cmd); in binder_thread_read()
4162 binder_stat_br(proc, thread, cmd); in binder_thread_read()
4165 proc->pid, thread->pid, in binder_thread_read()
4169 t->debug_id, t_from ? t_from->proc->pid : 0, in binder_thread_read()
4179 binder_inner_proc_lock(thread->proc); in binder_thread_read()
4183 binder_inner_proc_unlock(thread->proc); in binder_thread_read()
4193 binder_inner_proc_lock(proc); in binder_thread_read()
4194 if (proc->requested_threads == 0 && in binder_thread_read()
4195 list_empty(&thread->proc->waiting_threads) && in binder_thread_read()
4196 proc->requested_threads_started < proc->max_threads && in binder_thread_read()
4200 proc->requested_threads++; in binder_thread_read()
4201 binder_inner_proc_unlock(proc); in binder_thread_read()
4204 proc->pid, thread->pid); in binder_thread_read()
4207 binder_stat_br(proc, thread, BR_SPAWN_LOOPER); in binder_thread_read()
4209 binder_inner_proc_unlock(proc); in binder_thread_read()
4213 static void binder_release_work(struct binder_proc *proc, in binder_release_work() argument
4220 binder_inner_proc_lock(proc); in binder_release_work()
4223 binder_inner_proc_unlock(proc); in binder_release_work()
4273 struct binder_proc *proc, struct binder_thread *new_thread) in binder_get_thread_ilocked() argument
4277 struct rb_node **p = &proc->threads.rb_node; in binder_get_thread_ilocked()
4294 thread->proc = proc; in binder_get_thread_ilocked()
4300 rb_insert_color(&thread->rb_node, &proc->threads); in binder_get_thread_ilocked()
4310 static struct binder_thread *binder_get_thread(struct binder_proc *proc) in binder_get_thread() argument
4315 binder_inner_proc_lock(proc); in binder_get_thread()
4316 thread = binder_get_thread_ilocked(proc, NULL); in binder_get_thread()
4317 binder_inner_proc_unlock(proc); in binder_get_thread()
4322 binder_inner_proc_lock(proc); in binder_get_thread()
4323 thread = binder_get_thread_ilocked(proc, new_thread); in binder_get_thread()
4324 binder_inner_proc_unlock(proc); in binder_get_thread()
4331 static void binder_free_proc(struct binder_proc *proc) in binder_free_proc() argument
4335 BUG_ON(!list_empty(&proc->todo)); in binder_free_proc()
4336 BUG_ON(!list_empty(&proc->delivered_death)); in binder_free_proc()
4337 if (proc->outstanding_txns) in binder_free_proc()
4339 __func__, proc->outstanding_txns); in binder_free_proc()
4340 device = container_of(proc->context, struct binder_device, context); in binder_free_proc()
4342 kfree(proc->context->name); in binder_free_proc()
4345 binder_alloc_deferred_release(&proc->alloc); in binder_free_proc()
4346 put_task_struct(proc->tsk); in binder_free_proc()
4347 put_cred(proc->cred); in binder_free_proc()
4349 kfree(proc); in binder_free_proc()
4356 binder_proc_dec_tmpref(thread->proc); in binder_free_thread()
4360 static int binder_thread_release(struct binder_proc *proc, in binder_thread_release() argument
4368 binder_inner_proc_lock(thread->proc); in binder_thread_release()
4375 proc->tmp_ref++; in binder_thread_release()
4381 rb_erase(&thread->rb_node, &proc->threads); in binder_thread_release()
4397 proc->pid, thread->pid, in binder_thread_release()
4402 thread->proc->outstanding_txns--; in binder_thread_release()
4431 binder_inner_proc_unlock(thread->proc); in binder_thread_release()
4445 binder_release_work(proc, &thread->todo); in binder_thread_release()
4453 struct binder_proc *proc = filp->private_data; in binder_poll() local
4457 thread = binder_get_thread(proc); in binder_poll()
4461 binder_inner_proc_lock(thread->proc); in binder_poll()
4465 binder_inner_proc_unlock(thread->proc); in binder_poll()
4480 struct binder_proc *proc = filp->private_data; in binder_ioctl_write_read() local
4495 proc->pid, thread->pid, in binder_ioctl_write_read()
4500 ret = binder_thread_write(proc, thread, in binder_ioctl_write_read()
4513 ret = binder_thread_read(proc, thread, bwr.read_buffer, in binder_ioctl_write_read()
4518 binder_inner_proc_lock(proc); in binder_ioctl_write_read()
4519 if (!binder_worklist_empty_ilocked(&proc->todo)) in binder_ioctl_write_read()
4520 binder_wakeup_proc_ilocked(proc); in binder_ioctl_write_read()
4521 binder_inner_proc_unlock(proc); in binder_ioctl_write_read()
4530 proc->pid, thread->pid, in binder_ioctl_write_read()
4545 struct binder_proc *proc = filp->private_data; in binder_ioctl_set_ctx_mgr() local
4546 struct binder_context *context = proc->context; in binder_ioctl_set_ctx_mgr()
4556 ret = security_binder_set_context_mgr(proc->cred); in binder_ioctl_set_ctx_mgr()
4571 new_node = binder_new_node(proc, fbo); in binder_ioctl_set_ctx_mgr()
4589 static int binder_ioctl_get_node_info_for_ref(struct binder_proc *proc, in binder_ioctl_get_node_info_for_ref() argument
4593 struct binder_context *context = proc->context; in binder_ioctl_get_node_info_for_ref()
4599 proc->pid); in binder_ioctl_get_node_info_for_ref()
4606 context->binder_context_mgr_node->proc != proc) { in binder_ioctl_get_node_info_for_ref()
4612 node = binder_get_node_from_ref(proc, handle, true, NULL); in binder_ioctl_get_node_info_for_ref()
4625 static int binder_ioctl_get_node_debug_info(struct binder_proc *proc, in binder_ioctl_get_node_debug_info() argument
4633 binder_inner_proc_lock(proc); in binder_ioctl_get_node_debug_info()
4634 for (n = rb_first(&proc->nodes); n != NULL; n = rb_next(n)) { in binder_ioctl_get_node_debug_info()
4645 binder_inner_proc_unlock(proc); in binder_ioctl_get_node_debug_info()
4650 static bool binder_txns_pending_ilocked(struct binder_proc *proc) in binder_txns_pending_ilocked() argument
4655 if (proc->outstanding_txns > 0) in binder_txns_pending_ilocked()
4658 for (n = rb_first(&proc->threads); n; n = rb_next(n)) { in binder_txns_pending_ilocked()
4747 struct binder_proc *proc = filp->private_data; in binder_ioctl() local
4755 binder_selftest_alloc(&proc->alloc); in binder_ioctl()
4763 thread = binder_get_thread(proc); in binder_ioctl()
4783 binder_inner_proc_lock(proc); in binder_ioctl()
4784 proc->max_threads = max_threads; in binder_ioctl()
4785 binder_inner_proc_unlock(proc); in binder_ioctl()
4807 proc->pid, thread->pid); in binder_ioctl()
4808 binder_thread_release(proc, thread); in binder_ioctl()
4833 ret = binder_ioctl_get_node_info_for_ref(proc, &info); in binder_ioctl()
4852 ret = binder_ioctl_get_node_debug_info(proc, &info); in binder_ioctl()
4947 binder_inner_proc_lock(proc); in binder_ioctl()
4948 proc->oneway_spam_detection_enabled = (bool)enable; in binder_ioctl()
4949 binder_inner_proc_unlock(proc); in binder_ioctl()
4962 pr_info("%d:%d ioctl %x %lx returned %d\n", proc->pid, current->pid, cmd, arg, ret); in binder_ioctl()
4970 struct binder_proc *proc = vma->vm_private_data; in binder_vma_open() local
4974 proc->pid, vma->vm_start, vma->vm_end, in binder_vma_open()
4981 struct binder_proc *proc = vma->vm_private_data; in binder_vma_close() local
4985 proc->pid, vma->vm_start, vma->vm_end, in binder_vma_close()
4988 binder_alloc_vma_close(&proc->alloc); in binder_vma_close()
5004 struct binder_proc *proc = filp->private_data; in binder_mmap() local
5006 if (proc->tsk != current->group_leader) in binder_mmap()
5011 __func__, proc->pid, vma->vm_start, vma->vm_end, in binder_mmap()
5017 proc->pid, vma->vm_start, vma->vm_end, "bad vm_flags", -EPERM); in binder_mmap()
5024 vma->vm_private_data = proc; in binder_mmap()
5026 return binder_alloc_mmap_handler(&proc->alloc, vma); in binder_mmap()
5031 struct binder_proc *proc, *itr; in binder_open() local
5040 proc = kzalloc(sizeof(*proc), GFP_KERNEL); in binder_open()
5041 if (proc == NULL) in binder_open()
5043 spin_lock_init(&proc->inner_lock); in binder_open()
5044 spin_lock_init(&proc->outer_lock); in binder_open()
5046 proc->tsk = current->group_leader; in binder_open()
5047 proc->cred = get_cred(filp->f_cred); in binder_open()
5048 INIT_LIST_HEAD(&proc->todo); in binder_open()
5049 init_waitqueue_head(&proc->freeze_wait); in binder_open()
5050 proc->default_priority = task_nice(current); in binder_open()
5061 proc->context = &binder_dev->context; in binder_open()
5062 binder_alloc_init(&proc->alloc); in binder_open()
5065 proc->pid = current->group_leader->pid; in binder_open()
5066 INIT_LIST_HEAD(&proc->delivered_death); in binder_open()
5067 INIT_LIST_HEAD(&proc->waiting_threads); in binder_open()
5068 filp->private_data = proc; in binder_open()
5072 if (itr->pid == proc->pid) { in binder_open()
5077 hlist_add_head(&proc->proc_node, &binder_procs); in binder_open()
5083 snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); in binder_open()
5090 proc->debugfs_entry = debugfs_create_file(strbuf, 0444, in binder_open()
5092 (void *)(unsigned long)proc->pid, in binder_open()
5100 snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); in binder_open()
5108 strbuf, &proc_fops, (void *)(unsigned long)proc->pid); in binder_open()
5110 proc->binderfs_entry = binderfs_entry; in binder_open()
5125 struct binder_proc *proc = filp->private_data; in binder_flush() local
5127 binder_defer_work(proc, BINDER_DEFERRED_FLUSH); in binder_flush()
5132 static void binder_deferred_flush(struct binder_proc *proc) in binder_deferred_flush() argument
5137 binder_inner_proc_lock(proc); in binder_deferred_flush()
5138 for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) { in binder_deferred_flush()
5147 binder_inner_proc_unlock(proc); in binder_deferred_flush()
5150 "binder_flush: %d woke %d threads\n", proc->pid, in binder_deferred_flush()
5156 struct binder_proc *proc = filp->private_data; in binder_release() local
5158 debugfs_remove(proc->debugfs_entry); in binder_release()
5160 if (proc->binderfs_entry) { in binder_release()
5161 binderfs_remove_file(proc->binderfs_entry); in binder_release()
5162 proc->binderfs_entry = NULL; in binder_release()
5165 binder_defer_work(proc, BINDER_DEFERRED_RELEASE); in binder_release()
5174 struct binder_proc *proc = node->proc; in binder_node_release() local
5176 binder_release_work(proc, &node->async_todo); in binder_node_release()
5179 binder_inner_proc_lock(proc); in binder_node_release()
5186 binder_inner_proc_unlock(proc); in binder_node_release()
5193 node->proc = NULL; in binder_node_release()
5196 binder_inner_proc_unlock(proc); in binder_node_release()
5210 binder_inner_proc_lock(ref->proc); in binder_node_release()
5212 binder_inner_proc_unlock(ref->proc); in binder_node_release()
5221 &ref->proc->todo); in binder_node_release()
5222 binder_wakeup_proc_ilocked(ref->proc); in binder_node_release()
5223 binder_inner_proc_unlock(ref->proc); in binder_node_release()
5235 static void binder_deferred_release(struct binder_proc *proc) in binder_deferred_release() argument
5237 struct binder_context *context = proc->context; in binder_deferred_release()
5242 hlist_del(&proc->proc_node); in binder_deferred_release()
5247 context->binder_context_mgr_node->proc == proc) { in binder_deferred_release()
5250 __func__, proc->pid); in binder_deferred_release()
5254 binder_inner_proc_lock(proc); in binder_deferred_release()
5259 proc->tmp_ref++; in binder_deferred_release()
5261 proc->is_dead = true; in binder_deferred_release()
5262 proc->is_frozen = false; in binder_deferred_release()
5263 proc->sync_recv = false; in binder_deferred_release()
5264 proc->async_recv = false; in binder_deferred_release()
5267 while ((n = rb_first(&proc->threads))) { in binder_deferred_release()
5271 binder_inner_proc_unlock(proc); in binder_deferred_release()
5273 active_transactions += binder_thread_release(proc, thread); in binder_deferred_release()
5274 binder_inner_proc_lock(proc); in binder_deferred_release()
5279 while ((n = rb_first(&proc->nodes))) { in binder_deferred_release()
5290 rb_erase(&node->rb_node, &proc->nodes); in binder_deferred_release()
5291 binder_inner_proc_unlock(proc); in binder_deferred_release()
5293 binder_inner_proc_lock(proc); in binder_deferred_release()
5295 binder_inner_proc_unlock(proc); in binder_deferred_release()
5298 binder_proc_lock(proc); in binder_deferred_release()
5299 while ((n = rb_first(&proc->refs_by_desc))) { in binder_deferred_release()
5305 binder_proc_unlock(proc); in binder_deferred_release()
5307 binder_proc_lock(proc); in binder_deferred_release()
5309 binder_proc_unlock(proc); in binder_deferred_release()
5311 binder_release_work(proc, &proc->todo); in binder_deferred_release()
5312 binder_release_work(proc, &proc->delivered_death); in binder_deferred_release()
5316 __func__, proc->pid, threads, nodes, incoming_refs, in binder_deferred_release()
5319 binder_proc_dec_tmpref(proc); in binder_deferred_release()
5324 struct binder_proc *proc; in binder_deferred_func() local
5331 proc = hlist_entry(binder_deferred_list.first, in binder_deferred_func()
5333 hlist_del_init(&proc->deferred_work_node); in binder_deferred_func()
5334 defer = proc->deferred_work; in binder_deferred_func()
5335 proc->deferred_work = 0; in binder_deferred_func()
5337 proc = NULL; in binder_deferred_func()
5343 binder_deferred_flush(proc); in binder_deferred_func()
5346 binder_deferred_release(proc); /* frees proc */ in binder_deferred_func()
5347 } while (proc); in binder_deferred_func()
5352 binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer) in binder_defer_work() argument
5355 proc->deferred_work |= defer; in binder_defer_work()
5356 if (hlist_unhashed(&proc->deferred_work_node)) { in binder_defer_work()
5357 hlist_add_head(&proc->deferred_work_node, in binder_defer_work()
5365 struct binder_proc *proc, in print_binder_transaction_ilocked() argument
5377 t->from ? t->from->proc->pid : 0, in print_binder_transaction_ilocked()
5384 if (proc != to_proc) { in print_binder_transaction_ilocked()
5405 struct binder_proc *proc, in print_binder_work_ilocked() argument
5417 m, proc, transaction_prefix, t); in print_binder_work_ilocked()
5467 print_binder_transaction_ilocked(m, thread->proc, in print_binder_thread_ilocked()
5471 print_binder_transaction_ilocked(m, thread->proc, in print_binder_thread_ilocked()
5475 print_binder_transaction_ilocked(m, thread->proc, in print_binder_thread_ilocked()
5481 print_binder_work_ilocked(m, thread->proc, " ", in print_binder_thread_ilocked()
5507 seq_printf(m, " %d", ref->proc->pid); in print_binder_node_nilocked()
5510 if (node->proc) { in print_binder_node_nilocked()
5512 print_binder_work_ilocked(m, node->proc, " ", in print_binder_node_nilocked()
5523 ref->node->proc ? "" : "dead ", in print_binder_ref_olocked()
5530 struct binder_proc *proc, int print_all) in print_binder_proc() argument
5538 seq_printf(m, "proc %d\n", proc->pid); in print_binder_proc()
5539 seq_printf(m, "context %s\n", proc->context->name); in print_binder_proc()
5542 binder_inner_proc_lock(proc); in print_binder_proc()
5543 for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) in print_binder_proc()
5547 for (n = rb_first(&proc->nodes); n != NULL; n = rb_next(n)) { in print_binder_proc()
5560 binder_inner_proc_unlock(proc); in print_binder_proc()
5567 binder_inner_proc_lock(proc); in print_binder_proc()
5569 binder_inner_proc_unlock(proc); in print_binder_proc()
5574 binder_proc_lock(proc); in print_binder_proc()
5575 for (n = rb_first(&proc->refs_by_desc); in print_binder_proc()
5581 binder_proc_unlock(proc); in print_binder_proc()
5583 binder_alloc_print_allocated(m, &proc->alloc); in print_binder_proc()
5584 binder_inner_proc_lock(proc); in print_binder_proc()
5585 list_for_each_entry(w, &proc->todo, entry) in print_binder_proc()
5586 print_binder_work_ilocked(m, proc, " ", in print_binder_proc()
5588 list_for_each_entry(w, &proc->delivered_death, entry) { in print_binder_proc()
5592 binder_inner_proc_unlock(proc); in print_binder_proc()
5695 struct binder_proc *proc) in print_binder_proc_stats() argument
5702 binder_alloc_get_free_async_space(&proc->alloc); in print_binder_proc_stats()
5704 seq_printf(m, "proc %d\n", proc->pid); in print_binder_proc_stats()
5705 seq_printf(m, "context %s\n", proc->context->name); in print_binder_proc_stats()
5708 binder_inner_proc_lock(proc); in print_binder_proc_stats()
5709 for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) in print_binder_proc_stats()
5712 list_for_each_entry(thread, &proc->waiting_threads, waiting_thread_node) in print_binder_proc_stats()
5718 " free async space %zd\n", proc->requested_threads, in print_binder_proc_stats()
5719 proc->requested_threads_started, proc->max_threads, in print_binder_proc_stats()
5723 for (n = rb_first(&proc->nodes); n != NULL; n = rb_next(n)) in print_binder_proc_stats()
5725 binder_inner_proc_unlock(proc); in print_binder_proc_stats()
5730 binder_proc_lock(proc); in print_binder_proc_stats()
5731 for (n = rb_first(&proc->refs_by_desc); n != NULL; n = rb_next(n)) { in print_binder_proc_stats()
5738 binder_proc_unlock(proc); in print_binder_proc_stats()
5741 count = binder_alloc_get_allocated_count(&proc->alloc); in print_binder_proc_stats()
5744 binder_alloc_print_pages(m, &proc->alloc); in print_binder_proc_stats()
5747 binder_inner_proc_lock(proc); in print_binder_proc_stats()
5748 list_for_each_entry(w, &proc->todo, entry) { in print_binder_proc_stats()
5752 binder_inner_proc_unlock(proc); in print_binder_proc_stats()
5755 print_binder_stats(m, " ", &proc->stats); in print_binder_proc_stats()
5761 struct binder_proc *proc; in binder_state_show() local
5791 hlist_for_each_entry(proc, &binder_procs, proc_node) in binder_state_show()
5792 print_binder_proc(m, proc, 1); in binder_state_show()
5800 struct binder_proc *proc; in binder_stats_show() local
5807 hlist_for_each_entry(proc, &binder_procs, proc_node) in binder_stats_show()
5808 print_binder_proc_stats(m, proc); in binder_stats_show()
5816 struct binder_proc *proc; in binder_transactions_show() local
5820 hlist_for_each_entry(proc, &binder_procs, proc_node) in binder_transactions_show()
5821 print_binder_proc(m, proc, 0); in binder_transactions_show()