From: Greg KH <greg@kroah.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: stable@vger.kernel.org, Alison Schofield <amsfield22@gmail.com>,
Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH 3.16-4.4] iio: iio-trig-periodic-rtc: Free trigger resource correctly
Date: Tue, 28 Nov 2017 10:19:23 +0100 [thread overview]
Message-ID: <20171128091923.GD7891@kroah.com> (raw)
In-Reply-To: <20171122171231.lr54tqp3umbuexbs@xylophone.i.decadent.org.uk>
On Wed, Nov 22, 2017 at 05:12:41PM +0000, Ben Hutchings wrote:
> This is based on upstream commit 10e840dfb0b7, which did not touch the
> iio-trig-periodic-rtc driver because it has been removed upstream.
>
> The following explanation comes from that commit:
>
> 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.
>
> This was build tested only.
>
> Cc: Alison Schofield <amsfield22@gmail.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Thanks for the patch, now queued up.
greg k-h
next prev parent reply other threads:[~2017-11-28 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 17:12 [PATCH 3.16-4.4] iio: iio-trig-periodic-rtc: Free trigger resource correctly Ben Hutchings
2017-11-28 9:19 ` Greg KH [this message]
2017-11-28 9:27 ` Patch "iio: iio-trig-periodic-rtc: Free trigger resource correctly" has been added to the 3.18-stable tree gregkh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128091923.GD7891@kroah.com \
--to=greg@kroah.com \
--cc=amsfield22@gmail.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=jic23@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.