[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171118150427.5bda6f00@archlinux>
Date: Sat, 18 Nov 2017 15:04:27 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Ben Hutchings <ben.hutchings@...ethink.co.uk>,
Alison Schofield <amsfield22@...il.com>,
stable@...r.kernel.org, Sasha Levin <alexander.levin@...izon.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4.4 13/56] iio: trigger: free trigger resource correctly
On Wed, 15 Nov 2017 17:11:35 +0100
Greg Kroah-Hartman <gregkh@...uxfoundation.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@...il.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
Powered by blists - more mailing lists