Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417093
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] gpiolib: Fix unaligned used of reference counters |
| Date | 2016-06-08 11:00 +0200 |
| Message-ID | <rHHvc-6mU-5@gated-at.bofh.it> (permalink) |
| References | <rG0Vj-64k-13@gated-at.bofh.it> <rG0Vj-64k-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jun 3, 2016 at 7:10 PM, Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote: > gpiolib relies on the reference counters to clean up the gpio_device > structure. > > Although the number of get/put is properly aligned on gpiolib.c > itself, it does not take into consideration how the referece counters > are affected by other external functions such as cdev_add and device_add. > > Because of this, after the last call to put_device, the reference counter > has a value of +3, therefore never calling gpiodevice_release. > > Due to the fact that some of the device has already been cleaned on > gpiochip_remove, the library will end up OOPsing the kernel (e.g. a call > to of_gpiochip_find_and_xlate). > > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Again, thanks for fixing my stupid mistakes. Applied and tagged for stable. Yours, Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] gpiolib: Fix NULL pointer deference Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-06-03 19:20 +0200
[PATCH 2/2] gpiolib: Fix unaligned used of reference counters Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-06-03 19:20 +0200
Re: [PATCH 2/2] gpiolib: Fix unaligned used of reference counters Linus Walleij <linus.walleij@linaro.org> - 2016-06-08 11:00 +0200
Re: [PATCH 1/2] gpiolib: Fix NULL pointer deference Linus Walleij <linus.walleij@linaro.org> - 2016-06-08 10:40 +0200
Re: [PATCH 1/2] gpiolib: Fix NULL pointer deference Grygorii Strashko <grygorii.strashko@ti.com> - 2016-06-08 11:50 +0200
csiph-web