Skip to contentSkip to conversation

intel_th: Fixes for 4.11

PATCH In review Alexander Shishkin 1 participant 5 messages Mar 14, 2017

Subsystems (3)
lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH v20170314 1/3 intel_th: msu: Don't leak module refcount on failure to activate

In reply to Alexander Shishkin

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.

---
 drivers/hwtracing/intel_th/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/hwtracing/intel_th/core.c +3 -1
index cdd9b3b261..7563eceeaa 100644
@@ -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;
 }
Signature · 1 line
2.11.0

Alexander Shishkin

author maintainer
#0 lore raw

v20170314 cover intel_th: Fixes for 4.11

Hi,

These are the fixes I have queued for the current release. One fixes a module refcount leak and two new PCI IDs are added.

Regards,
--
Alex

Alexander Shishkin (3):
intel_th: msu: Don't leak module refcount on failure to activate
intel_th: pci: Add Denverton SOC support
intel_th: pci: Add Gemini Lake support

 drivers/hwtracing/intel_th/core.c |  4 +++-
 drivers/hwtracing/intel_th/pci.c  | 10 ++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
Signature · 1 line
2.11.0
author maintainer
#2 lore raw

PATCH v20170314 2/3 intel_th: pci: Add Denverton SOC support

This adds Intel(R) Trace Hub PCI ID for Denverton SOC.

---
 drivers/hwtracing/intel_th/pci.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/hwtracing/intel_th/pci.c +5 -0
index 0bba384233..04bd57b010 100644
@@ -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 },
 };
 
Signature · 1 line
2.11.0
author maintainer
#3 lore raw

PATCH v20170314 3/3 intel_th: pci: Add Gemini Lake support

In reply to Alexander Shishkin

This adds Intel(R) Trace Hub PCI ID for Gemini Lake SOC.

---
 drivers/hwtracing/intel_th/pci.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/hwtracing/intel_th/pci.c +5 -0
index 04bd57b010..590cf90dd2 100644
@@ -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 },
 };
 
Signature · 1 line
2.11.0
author maintainer
#4 lore raw
In reply to Alexander Shishkin
Quoted 2 lines · Alexander Shishkin

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