Re: [PATCH] android: binder: Check for errors in binder_alloc_shrinker_init().

2017-12-14 Thread Dan Carpenter
On Thu, Dec 14, 2017 at 10:52:28AM -0800, Todd Kjos wrote:
> On Fri, Dec 8, 2017 at 3:08 AM, Dan Carpenter  
> wrote:
> > On Wed, Dec 06, 2017 at 02:05:58PM -0500, Sherry Yang wrote:
> >> Hi Tetsuo,
> >>
> >> It looks like this patch was not submitted to LKML. Perhaps you want
> >> to send it to the mailing list and add the correct set of recipients
> >> using scripts/get_maintainer.pl as suggested here
> >> https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html.
> >>
> >> -Sherry
> >>
> >
> > I've always viewed the de...@driverdev.osuosl.org as sufficient.  You're
> > not really going to get more reviewers by CC'ing LKML...
> 
> Well it might have picked up some more android folks (like me) who
> aren't on that list.
> 

The right thing is to add you to MAINTAINERS and we've just done that.

You have procmail scripts which select android stuff from LKML?  You
should really be subscribed to driver devel as well because that is the
mailing list for Android stuff.  And you already seem to have procmail
set up so there really is no reason not.

regards,
dan carpenter


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] android: binder: Check for errors in binder_alloc_shrinker_init().

2017-12-08 Thread Dan Carpenter
On Wed, Dec 06, 2017 at 02:05:58PM -0500, Sherry Yang wrote:
> Hi Tetsuo,
> 
> It looks like this patch was not submitted to LKML. Perhaps you want
> to send it to the mailing list and add the correct set of recipients
> using scripts/get_maintainer.pl as suggested here
> https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html.
> 
> -Sherry
> 

I've always viewed the de...@driverdev.osuosl.org as sufficient.  You're
not really going to get more reviewers by CC'ing LKML...

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] android: binder: Check for errors in binder_alloc_shrinker_init().

2017-12-06 Thread Sherry Yang
Hi Tetsuo,

It looks like this patch was not submitted to LKML. Perhaps you want
to send it to the mailing list and add the correct set of recipients
using scripts/get_maintainer.pl as suggested here
https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html.

-Sherry

On Wed, Nov 29, 2017 at 8:29 AM, Tetsuo Handa
 wrote:
> Both list_lru_init() and register_shrinker() might return an error.
>
> Signed-off-by: Tetsuo Handa 
> Cc: Sherry Yang 
> Cc: Greg Kroah-Hartman 
> Cc: Michal Hocko 
> ---
>  drivers/android/binder.c   |  4 +++-
>  drivers/android/binder_alloc.c | 12 +---
>  drivers/android/binder_alloc.h |  2 +-
>  3 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 85b0bb4..a54a0f1 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -5569,7 +5569,9 @@ static int __init binder_init(void)
> struct binder_device *device;
> struct hlist_node *tmp;
>
> -   binder_alloc_shrinker_init();
> +   ret = binder_alloc_shrinker_init();
> +   if (ret)
> +   return ret;
>
> atomic_set(_transaction_log.cur, ~0U);
> atomic_set(_transaction_log_failed.cur, ~0U);
> diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
> index 0dba2308..fdf9d9f 100644
> --- a/drivers/android/binder_alloc.c
> +++ b/drivers/android/binder_alloc.c
> @@ -1006,8 +1006,14 @@ void binder_alloc_init(struct binder_alloc *alloc)
> INIT_LIST_HEAD(>buffers);
>  }
>
> -void binder_alloc_shrinker_init(void)
> +int binder_alloc_shrinker_init(void)
>  {
> -   list_lru_init(_alloc_lru);
> -   register_shrinker(_shrinker);
> +   int ret = list_lru_init(_alloc_lru);
> +
> +   if (ret == 0) {
> +   ret = register_shrinker(_shrinker);
> +   if (ret)
> +   list_lru_destroy(_alloc_lru);
> +   }
> +   return ret;
>  }
> diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h
> index 0b14530..9ef64e5 100644
> --- a/drivers/android/binder_alloc.h
> +++ b/drivers/android/binder_alloc.h
> @@ -130,7 +130,7 @@ extern struct binder_buffer *binder_alloc_new_buf(struct 
> binder_alloc *alloc,
>   size_t extra_buffers_size,
>   int is_async);
>  extern void binder_alloc_init(struct binder_alloc *alloc);
> -void binder_alloc_shrinker_init(void);
> +extern int binder_alloc_shrinker_init(void);
>  extern void binder_alloc_vma_close(struct binder_alloc *alloc);
>  extern struct binder_buffer *
>  binder_alloc_prepare_to_free(struct binder_alloc *alloc,
> --
> 1.8.3.1
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel