Re: [PATCH v1 1/3] binder: BINDER_FREEZE ioctl

2021-03-11 Thread Greg KH
On Thu, Mar 11, 2021 at 01:36:26AM -0800, Li Li wrote: > On Wed, Mar 10, 2021 at 11:33 PM Greg KH wrote: > > > > On Wed, Mar 10, 2021 at 02:52:49PM -0800, Li Li wrote: > > > if (target_proc) { > > > binder_inner_proc_lock(target_proc); > > > + target_proc->outstandi

Re: [PATCH v1 1/3] binder: BINDER_FREEZE ioctl

2021-03-11 Thread Li Li
On Wed, Mar 10, 2021 at 11:33 PM Greg KH wrote: > > On Wed, Mar 10, 2021 at 02:52:49PM -0800, Li Li wrote: > > if (target_proc) { > > binder_inner_proc_lock(target_proc); > > + target_proc->outstanding_txns--; > > + WARN_ON(target_proc->outstanding_txns

Re: [PATCH v1 1/3] binder: BINDER_FREEZE ioctl

2021-03-10 Thread Greg KH
On Wed, Mar 10, 2021 at 02:52:49PM -0800, Li Li wrote: > if (target_proc) { > binder_inner_proc_lock(target_proc); > + target_proc->outstanding_txns--; > + WARN_ON(target_proc->outstanding_txns < 0); WARN_* is a huge crutch, please just handle stuff like

[PATCH v1 1/3] binder: BINDER_FREEZE ioctl

2021-03-10 Thread Li Li
From: Marco Ballesio Frozen tasks can't process binder transactions, so a way is required to inform transmitting ends of communication failures due to the frozen state of their receiving counterparts. Additionally, races are possible between transitions to frozen state and binder transactions enq