lkml.org 
[lkml]   [2017]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.4 13/56] iio: trigger: free trigger resource correctly
On Wed, 15 Nov 2017 17:11:35 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Tue, Nov 14, 2017 at 08:14:34PM +0000, Ben Hutchings wrote:
> > On Mon, 2017-11-13 at 13:55 +0100, Greg Kroah-Hartman wrote:
> > > 4.4-stable review patch.  If anyone has any objections, please let me
> > > know.
> > >
> > > ------------------
> > >
> > > From: Alison Schofield <amsfield22@gmail.com>
> > >
> > >
> > > [ Upstream commit 10e840dfb0b7fc345082dd9e5fff3c1c02e7690e ]
> > >
> > > 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.
> >
> > In 4.4 the iio-trig-periodic-rtc seems to have the same bug (it has
> > been removed upstream). Would it make sense to fix it in 4.4?
>
> Probably, or if it has been removed for a good reason, we can always
> remove it in 4.4 :)

It was removed after the introduction of the high resolution timer
trigger as in recent times periodic rtcs have all been emulated
anyway (as high resolution timers). Unfortunately the hrt trigger
wasn't present in 4.4 so simply dropping the periodic rtc trigger
'might' leave people unable to do what they want.

So best bet would be to fix this periodic rtc trigger as
Ben suggested.

Jonathan
>
> thanks,
>
> greg k-h

\
 
 \ /
  Last update: 2017-11-18 16:05    [W:0.057 / U:10.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site