Re: [PATCH v2] [BUGFIX] gpio: reject invalid gpio before getting gpio_desc

2017-08-01 Thread Masami Hiramatsu
On Tue, 1 Aug 2017 14:10:03 +0300 Andy Shevchenko wrote: > On Mon, Jul 31, 2017 at 4:57 AM, Masami Hiramatsu wrote: > > Check user-given gpio number and reject it before > > calling gpio_to_desc() because gpio_to_desc() is > > for kernel driver and it expects given gpio number > > is valid (mean

Re: [PATCH v2] [BUGFIX] gpio: reject invalid gpio before getting gpio_desc

2017-08-01 Thread Andy Shevchenko
On Mon, Jul 31, 2017 at 4:57 AM, Masami Hiramatsu wrote: > Check user-given gpio number and reject it before > calling gpio_to_desc() because gpio_to_desc() is > for kernel driver and it expects given gpio number > is valid (means 0 to 511). > If given number is invalid, gpio_to_desc() calls > WAR

Re: [PATCH v2] [BUGFIX] gpio: reject invalid gpio before getting gpio_desc

2017-08-01 Thread Masami Hiramatsu
On Tue, 1 Aug 2017 10:09:09 +0200 Linus Walleij wrote: > On Mon, Jul 31, 2017 at 3:57 AM, Masami Hiramatsu wrote: > > > Check user-given gpio number and reject it before > > calling gpio_to_desc() because gpio_to_desc() is > > for kernel driver and it expects given gpio number > > is valid (mea

Re: [PATCH v2] [BUGFIX] gpio: reject invalid gpio before getting gpio_desc

2017-08-01 Thread Linus Walleij
On Mon, Jul 31, 2017 at 3:57 AM, Masami Hiramatsu wrote: > Check user-given gpio number and reject it before > calling gpio_to_desc() because gpio_to_desc() is > for kernel driver and it expects given gpio number > is valid (means 0 to 511). > If given number is invalid, gpio_to_desc() calls > WA