* Patch "intel_th: Don't leak module refcount on failure to activate" has been added to the 4.10-stable tree
@ 2017-03-28 11:04 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-28 11:04 UTC (permalink / raw)
To: alexander.shishkin, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
intel_th: Don't leak module refcount on failure to activate
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
intel_th-don-t-leak-module-refcount-on-failure-to-activate.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From e609ccef5222c73b46b322be7d3796d60bff353d Mon Sep 17 00:00:00 2001
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Date: Fri, 24 Feb 2017 16:04:15 +0200
Subject: intel_th: Don't leak module refcount on failure to activate
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
commit e609ccef5222c73b46b322be7d3796d60bff353d upstream.
Output 'activation' may fail for the reasons of the output driver,
for example, if msc's buffer is not allocated. We forget, however,
to drop the module reference in this case. So each attempt at
activation in this case leaks a reference, preventing the module
from ever unloading.
This patch adds the missing module_put() in the activation error
path.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hwtracing/intel_th/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -221,8 +221,10 @@ static int intel_th_output_activate(stru
else
intel_th_trace_enable(thdev);
- if (ret)
+ if (ret) {
pm_runtime_put(&thdev->dev);
+ module_put(thdrv->driver.owner);
+ }
return ret;
}
Patches currently in stable-queue which might be from alexander.shishkin@linux.intel.com are
queue-4.10/intel_th-don-t-leak-module-refcount-on-failure-to-activate.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-28 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 11:04 Patch "intel_th: Don't leak module refcount on failure to activate" has been added to the 4.10-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).