From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33519 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbdK1JTS (ORCPT ); Tue, 28 Nov 2017 04:19:18 -0500 Date: Tue, 28 Nov 2017 10:19:23 +0100 From: Greg KH To: Ben Hutchings Cc: stable@vger.kernel.org, Alison Schofield , Jonathan Cameron Subject: Re: [PATCH 3.16-4.4] iio: iio-trig-periodic-rtc: Free trigger resource correctly Message-ID: <20171128091923.GD7891@kroah.com> References: <20171122171231.lr54tqp3umbuexbs@xylophone.i.decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171122171231.lr54tqp3umbuexbs@xylophone.i.decadent.org.uk> Sender: stable-owner@vger.kernel.org List-ID: 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 > Cc: Jonathan Cameron > Signed-off-by: Ben Hutchings Thanks for the patch, now queued up. greg k-h