* [QUEUED v20170314 1/3] intel_th: msu: Don't leak module refcount on failure to activate
2017-03-14 11:32 [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin
@ 2017-03-14 11:32 ` Alexander Shishkin
2017-03-14 11:32 ` [QUEUED v20170314 2/3] intel_th: pci: Add Denverton SOC support Alexander Shishkin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Shishkin @ 2017-03-14 11:32 UTC (permalink / raw)
To: Greg KH
Cc: Mathieu Poirier, Chunyan Zhang, laurent.fert, linux-kernel,
Alexander Shishkin, stable
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>
Cc: stable@vger.kernel.org # v4.8+
---
drivers/hwtracing/intel_th/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index cdd9b3b261..7563eceeaa 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -221,8 +221,10 @@ static int intel_th_output_activate(struct intel_th_device *thdev)
else
intel_th_trace_enable(thdev);
- if (ret)
+ if (ret) {
pm_runtime_put(&thdev->dev);
+ module_put(thdrv->driver.owner);
+ }
return ret;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [QUEUED v20170314 2/3] intel_th: pci: Add Denverton SOC support
2017-03-14 11:32 [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin
2017-03-14 11:32 ` [QUEUED v20170314 1/3] intel_th: msu: Don't leak module refcount on failure to activate Alexander Shishkin
@ 2017-03-14 11:32 ` Alexander Shishkin
2017-03-14 11:32 ` [QUEUED v20170314 3/3] intel_th: pci: Add Gemini Lake support Alexander Shishkin
2017-03-14 11:39 ` [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Shishkin @ 2017-03-14 11:32 UTC (permalink / raw)
To: Greg KH
Cc: Mathieu Poirier, Chunyan Zhang, laurent.fert, linux-kernel,
Alexander Shishkin
This adds Intel(R) Trace Hub PCI ID for Denverton SOC.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
drivers/hwtracing/intel_th/pci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
index 0bba384233..04bd57b010 100644
--- a/drivers/hwtracing/intel_th/pci.c
+++ b/drivers/hwtracing/intel_th/pci.c
@@ -85,6 +85,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa2a6),
.driver_data = (kernel_ulong_t)0,
},
+ {
+ /* Denverton */
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x19e1),
+ .driver_data = (kernel_ulong_t)0,
+ },
{ 0 },
};
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [QUEUED v20170314 3/3] intel_th: pci: Add Gemini Lake support
2017-03-14 11:32 [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin
2017-03-14 11:32 ` [QUEUED v20170314 1/3] intel_th: msu: Don't leak module refcount on failure to activate Alexander Shishkin
2017-03-14 11:32 ` [QUEUED v20170314 2/3] intel_th: pci: Add Denverton SOC support Alexander Shishkin
@ 2017-03-14 11:32 ` Alexander Shishkin
2017-03-14 11:39 ` [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Shishkin @ 2017-03-14 11:32 UTC (permalink / raw)
To: Greg KH
Cc: Mathieu Poirier, Chunyan Zhang, laurent.fert, linux-kernel,
Alexander Shishkin
This adds Intel(R) Trace Hub PCI ID for Gemini Lake SOC.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
drivers/hwtracing/intel_th/pci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
index 04bd57b010..590cf90dd2 100644
--- a/drivers/hwtracing/intel_th/pci.c
+++ b/drivers/hwtracing/intel_th/pci.c
@@ -90,6 +90,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x19e1),
.driver_data = (kernel_ulong_t)0,
},
+ {
+ /* Gemini Lake */
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x318e),
+ .driver_data = (kernel_ulong_t)0,
+ },
{ 0 },
};
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [QUEUED v20170314 0/3] intel_th: Fixes for 4.11
2017-03-14 11:32 [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin
` (2 preceding siblings ...)
2017-03-14 11:32 ` [QUEUED v20170314 3/3] intel_th: pci: Add Gemini Lake support Alexander Shishkin
@ 2017-03-14 11:39 ` Alexander Shishkin
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Shishkin @ 2017-03-14 11:39 UTC (permalink / raw)
To: Greg KH; +Cc: Mathieu Poirier, Chunyan Zhang, laurent.fert, linux-kernel
Alexander Shishkin <alexander.shishkin@linux.intel.com> writes:
> These are the fixes I have queued for the current release. One fixes a
> module refcount leak and two new PCI IDs are added.
That is, I'm going to send a pull request soon, unless there are
objections.
Regards,
--
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread