Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-29 Thread Alexandre Courbot
On Thu, Aug 29, 2013 at 6:52 PM, Linus Walleij wrote: > On Sat, Aug 24, 2013 at 10:48 PM, wrote: > >> [ 222.961384] Unable to handle kernel NULL pointer dereference at >> virtual address 0044 >> [ 222.969486] pgd = d97d >> [ 222.972190] [0044] *pgd=1aaca831, *pte=, *ppte=0

Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-29 Thread Linus Walleij
On Sat, Aug 24, 2013 at 10:48 PM, wrote: > [ 222.961384] Unable to handle kernel NULL pointer dereference at > virtual address 0044 > [ 222.969486] pgd = d97d > [ 222.972190] [0044] *pgd=1aaca831, *pte=, *ppte= > [ 222.978483] Internal error: Oops: 17 [#1] PREEMPT

Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-24 Thread Guenter Roeck
On 08/24/2013 01:48 PM, danielfsan...@att.net wrote: I got this on an RPi and I can't find anything specific to that. Besides, it's clearly wrong to try to access desc->chip when we have just tested that it may be NULL at drivers/gpio/gpiolib.c:1409: chip = desc->chip; if (chip =

Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-24 Thread Daniel Santos
On 08/24/2013 02:57 PM, Guenter Roeck wrote: Looking into calling code, desc_to_gpio() is clearly not supposed to return an error, and it will result in odd behavior if it returns -1. For example, the resulting debug message of "gpio--1 (...) status ..." is not very useful. It would make mo

Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-24 Thread Guenter Roeck
On 08/24/2013 11:48 AM, danielfsan...@att.net wrote: I got this on an RPi and I can't find anything specific to that. Besides, it's clearly wrong to try to access desc->chip when we have just tested that it may be NULL at drivers/gpio/gpiolib.c:1409: chip = desc->chip; if (chip =