Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-11 Thread Alexandre Courbot
On Mon, Feb 11, 2013 at 8:31 PM, Grant Likely wrote: > On Mon, Feb 11, 2013 at 4:28 AM, Alex Courbot wrote: >> Just wondering: if we manage to change this spinlock into a mutex in the >> future, wouldn't it be better to acquire it only once in gpiolib_seq_start() >> and release it in

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-11 Thread Linus Walleij
On Sat, Feb 9, 2013 at 11:34 AM, Grant Likely wrote: > The debugfs files really need to hold the gpiolib spinlock before > accessing the list. Otherwise chip addition/removal will cause an oops. > > Cc: Alexandre Courbot > Cc: Linus Walleij > Signed-off-by: Grant Likely Acked-by: Linus

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-11 Thread Grant Likely
On Mon, Feb 11, 2013 at 4:28 AM, Alex Courbot wrote: > On 02/09/2013 07:34 PM, Grant Likely wrote: >> >> The debugfs files really need to hold the gpiolib spinlock before >> accessing the list. Otherwise chip addition/removal will cause an oops. >> >> Cc: Alexandre Courbot >> Cc: Linus Walleij

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-11 Thread Grant Likely
On Mon, Feb 11, 2013 at 4:28 AM, Alex Courbot acour...@nvidia.com wrote: On 02/09/2013 07:34 PM, Grant Likely wrote: The debugfs files really need to hold the gpiolib spinlock before accessing the list. Otherwise chip addition/removal will cause an oops. Cc: Alexandre Courbot

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-11 Thread Linus Walleij
On Sat, Feb 9, 2013 at 11:34 AM, Grant Likely grant.lik...@secretlab.ca wrote: The debugfs files really need to hold the gpiolib spinlock before accessing the list. Otherwise chip addition/removal will cause an oops. Cc: Alexandre Courbot acour...@nvidia.com Cc: Linus Walleij

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-11 Thread Alexandre Courbot
On Mon, Feb 11, 2013 at 8:31 PM, Grant Likely grant.lik...@secretlab.ca wrote: On Mon, Feb 11, 2013 at 4:28 AM, Alex Courbot acour...@nvidia.com wrote: Just wondering: if we manage to change this spinlock into a mutex in the future, wouldn't it be better to acquire it only once in

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-10 Thread Alex Courbot
On 02/09/2013 07:34 PM, Grant Likely wrote: The debugfs files really need to hold the gpiolib spinlock before accessing the list. Otherwise chip addition/removal will cause an oops. Cc: Alexandre Courbot Cc: Linus Walleij Signed-off-by: Grant Likely Tested-by: Alexandre Courbot Just

Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

2013-02-10 Thread Alex Courbot
On 02/09/2013 07:34 PM, Grant Likely wrote: The debugfs files really need to hold the gpiolib spinlock before accessing the list. Otherwise chip addition/removal will cause an oops. Cc: Alexandre Courbot acour...@nvidia.com Cc: Linus Walleij linus.wall...@linaro.org Signed-off-by: Grant Likely