@@ -4076,7 +4076,6 @@ binder_request_freeze_notification(struct binder_proc *proc,
4076
4076
{
4077
4077
struct binder_ref_freeze * freeze ;
4078
4078
struct binder_ref * ref ;
4079
- bool is_frozen ;
4080
4079
4081
4080
freeze = kzalloc (sizeof (* freeze ), GFP_KERNEL );
4082
4081
if (!freeze )
@@ -4092,31 +4091,30 @@ binder_request_freeze_notification(struct binder_proc *proc,
4092
4091
}
4093
4092
4094
4093
binder_node_lock (ref -> node );
4095
-
4096
- if (ref -> freeze || !ref -> node -> proc ) {
4097
- binder_user_error ("%d:%d invalid BC_REQUEST_FREEZE_NOTIFICATION %s\n" ,
4098
- proc -> pid , thread -> pid ,
4099
- ref -> freeze ? "already set" : "dead node" );
4094
+ if (ref -> freeze ) {
4095
+ binder_user_error ("%d:%d BC_REQUEST_FREEZE_NOTIFICATION already set\n" ,
4096
+ proc -> pid , thread -> pid );
4100
4097
binder_node_unlock (ref -> node );
4101
4098
binder_proc_unlock (proc );
4102
4099
kfree (freeze );
4103
4100
return - EINVAL ;
4104
4101
}
4105
- binder_inner_proc_lock (ref -> node -> proc );
4106
- is_frozen = ref -> node -> proc -> is_frozen ;
4107
- binder_inner_proc_unlock (ref -> node -> proc );
4108
4102
4109
4103
INIT_LIST_HEAD (& freeze -> work .entry );
4110
4104
freeze -> cookie = handle_cookie -> cookie ;
4111
4105
freeze -> work .type = BINDER_WORK_FROZEN_BINDER ;
4112
- freeze -> is_frozen = is_frozen ;
4113
-
4114
4106
ref -> freeze = freeze ;
4115
4107
4116
- binder_inner_proc_lock (proc );
4117
- binder_enqueue_work_ilocked (& ref -> freeze -> work , & proc -> todo );
4118
- binder_wakeup_proc_ilocked (proc );
4119
- binder_inner_proc_unlock (proc );
4108
+ if (ref -> node -> proc ) {
4109
+ binder_inner_proc_lock (ref -> node -> proc );
4110
+ freeze -> is_frozen = ref -> node -> proc -> is_frozen ;
4111
+ binder_inner_proc_unlock (ref -> node -> proc );
4112
+
4113
+ binder_inner_proc_lock (proc );
4114
+ binder_enqueue_work_ilocked (& freeze -> work , & proc -> todo );
4115
+ binder_wakeup_proc_ilocked (proc );
4116
+ binder_inner_proc_unlock (proc );
4117
+ }
4120
4118
4121
4119
binder_node_unlock (ref -> node );
4122
4120
binder_proc_unlock (proc );
0 commit comments