Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600242 > unrolled thread

[QUEUED v20170314 0/3] intel_th: Fixes for 4.11

Started byAlexander Shishkin <alexander.shishkin@linux.intel.com>
First post2017-03-14 12:40 +0100
Last post2017-03-14 12:50 +0100
Articles 5 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-03-14 12:40 +0100
    [QUEUED v20170314 2/3] intel_th: pci: Add Denverton SOC support Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-03-14 12:40 +0100
    [QUEUED v20170314 3/3] intel_th: pci: Add Gemini Lake support Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-03-14 12:40 +0100
    [QUEUED v20170314 1/3] intel_th: msu: Don't leak module refcount on failure to activate Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-03-14 12:40 +0100
    Re: [QUEUED v20170314 0/3] intel_th: Fixes for 4.11 Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-03-14 12:50 +0100

#1600242 — [QUEUED v20170314 0/3] intel_th: Fixes for 4.11

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-03-14 12:40 +0100
Subject[QUEUED v20170314 0/3] intel_th: Fixes for 4.11
Message-ID<tkSY1-7U6-1@gated-at.bofh.it>
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(-)

-- 
2.11.0

[toc] | [next] | [standalone]


#1600243 — [QUEUED v20170314 2/3] intel_th: pci: Add Denverton SOC support

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-03-14 12:40 +0100
Subject[QUEUED v20170314 2/3] intel_th: pci: Add Denverton SOC support
Message-ID<tkSY1-7U6-3@gated-at.bofh.it>
In reply to#1600242
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

[toc] | [prev] | [next] | [standalone]


#1600249 — [QUEUED v20170314 3/3] intel_th: pci: Add Gemini Lake support

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-03-14 12:40 +0100
Subject[QUEUED v20170314 3/3] intel_th: pci: Add Gemini Lake support
Message-ID<tkSY3-7U6-35@gated-at.bofh.it>
In reply to#1600242
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

[toc] | [prev] | [next] | [standalone]


#1600255 — [QUEUED v20170314 1/3] intel_th: msu: Don't leak module refcount on failure to activate

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-03-14 12:40 +0100
Subject[QUEUED v20170314 1/3] intel_th: msu: Don't leak module refcount on failure to activate
Message-ID<tkSY3-7U6-47@gated-at.bofh.it>
In reply to#1600242
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

[toc] | [prev] | [next] | [standalone]


#1600261

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-03-14 12:50 +0100
Message-ID<tkT7H-7Za-3@gated-at.bofh.it>
In reply to#1600242
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web