Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-10 Thread Li Li
On Thu, Sep 9, 2021 at 11:03 PM Dan Carpenter wrote: > > On Thu, Sep 09, 2021 at 04:21:41PM -0700, Li Li wrote: > > @@ -4648,6 +4647,22 @@ static int binder_ioctl_get_node_debug_info(struct > > binder_proc *proc, > > return 0; > > } > > > > +static int binder_txns_pending(struct binder_pro

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-09 Thread Dan Carpenter
On Thu, Sep 09, 2021 at 04:21:41PM -0700, Li Li wrote: > @@ -4648,6 +4647,22 @@ static int binder_ioctl_get_node_debug_info(struct > binder_proc *proc, > return 0; > } > > +static int binder_txns_pending(struct binder_proc *proc) > +{ > + struct rb_node *n; > + struct binder_threa

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-09 Thread Todd Kjos
On Thu, Sep 9, 2021 at 4:21 PM Li Li wrote: > > From: Li Li > > Currently cgroup freezer is used to freeze the application threads, and > BINDER_FREEZE is used to freeze binder interface. There's already a > mechanism for BINDER_FREEZE to wait for any existing transactions to > drain out before a

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-09 Thread Li Li
Hi Todd, Thanks for reviewing the patch! Please see my reply below. And I'll send out v2 soon addressing your concerns. On Thu, Sep 9, 2021 at 4:54 PM Todd Kjos wrote: > > On Thu, Sep 9, 2021 at 4:21 PM Li Li wrote: > > > > From: Li Li > > > > Currently cgroup freezer is used to freeze the ap