Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1564448
| From | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] iio: trigger: free trigger resource correctly |
| Date | 2017-01-22 17:00 +0100 |
| Message-ID | <t2sIF-2A5-17@gated-at.bofh.it> (permalink) |
| References | <t1ywN-25e-15@gated-at.bofh.it> <t2rjz-1QF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/22/2017 03:25 PM, Jonathan Cameron wrote: > On 20/01/17 03:47, Alison Schofield wrote: >> These stand-alone trigger drivers were using iio_trigger_put() >> where they should have been using iio_trigger_free(). The >> iio_trigger_put() adds a module_put which is bad since they >> never did a module_get. >> >> In the sysfs driver, module_get/put's are used as triggers are >> added & removed. This extra module_put() occurs on an error path >> in the probe routine (probably rare). >> >> In the bfin-timer & interrupt trigger drivers, the module resources >> are not explicitly managed, so it's doing a put on something that >> was never get'd. It occurs on the probe error path and on the >> remove path (not so rare). >> >> Tested with the sysfs trigger driver. >> The bfin & interrupt drivers were build tested & inspected only. >> >> Signed-off-by: Alison Schofield <amsfield22@gmail.com> > This is certainly more consistent. > Lars, could you sanity check as well given the bfin timer is > in here. looks good.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] iio: trigger: free trigger resource correctly Alison Schofield <amsfield22@gmail.com> - 2017-01-20 05:00 +0100
Re: [PATCH v2] iio: trigger: free trigger resource correctly Jonathan Cameron <jic23@kernel.org> - 2017-01-22 15:30 +0100
Re: [PATCH v2] iio: trigger: free trigger resource correctly Lars-Peter Clausen <lars@metafoo.de> - 2017-01-22 17:00 +0100
Re: [PATCH v2] iio: trigger: free trigger resource correctly Jonathan Cameron <jic23@kernel.org> - 2017-01-22 17:20 +0100
csiph-web