From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:33718 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756665AbdKOQLa (ORCPT ); Wed, 15 Nov 2017 11:11:30 -0500 Date: Wed, 15 Nov 2017 17:11:35 +0100 From: Greg Kroah-Hartman To: Ben Hutchings Cc: Alison Schofield , Jonathan Cameron , stable@vger.kernel.org, Sasha Levin , LKML Subject: Re: [PATCH 4.4 13/56] iio: trigger: free trigger resource correctly Message-ID: <20171115161135.GA17330@kroah.com> References: <20171113125557.613444087@linuxfoundation.org> <20171113125559.283539115@linuxfoundation.org> <1510690474.18523.39.camel@codethink.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1510690474.18523.39.camel@codethink.co.uk> Sender: stable-owner@vger.kernel.org List-ID: 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 > > > > > > [ 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 :) thanks, greg k-h