Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735025 > unrolled thread
| Started by | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| First post | 2017-09-19 17:50 +0200 |
| Last post | 2017-09-19 18:00 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 0/3] intel_th/stm class: Fixes for v4.14 Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-09-19 17:50 +0200
[GIT PULL 1/3] stm class: Fix a use-after-free Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-09-19 17:50 +0200
Re: [GIT PULL 1/3] stm class: Fix a use-after-free Greg KH <greg@kroah.com> - 2017-09-22 10:30 +0200
Re: [GIT PULL 1/3] stm class: Fix a use-after-free Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-09-22 11:10 +0200
[GIT PULL 3/3] intel_th: pci: Add Lewisburg PCH support Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-09-19 18:00 +0200
[GIT PULL 2/3] intel_th: pci: Add Cedar Fork PCH support Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-09-19 18:00 +0200
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2017-09-19 17:50 +0200 |
| Subject | [GIT PULL 0/3] intel_th/stm class: Fixes for v4.14 |
| Message-ID | <ursWC-7h8-13@gated-at.bofh.it> |
Hi Greg,
These are the fixes I have so far for v4.14 window: 2 new PCI IDs and
one actual fix. Please consider pulling and/or applying. Thanks!
The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e:
Linux 4.14-rc1 (2017-09-16 15:47:51 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git tags/stm-fixes-for-greg-20170919
for you to fetch changes up to 4de8301b8cc7287585c93639934426388c6718c6:
intel_th: pci: Add Lewisburg PCH support (2017-09-19 18:32:10 +0300)
----------------------------------------------------------------
intel_th/stm class: Fixes for v4.14
These are:
* 2 new PCI IDs
* fix for stm_source device removal path
----------------------------------------------------------------
Alexander Shishkin (3):
stm class: Fix a use-after-free
intel_th: pci: Add Cedar Fork PCH support
intel_th: pci: Add Lewisburg PCH support
drivers/hwtracing/intel_th/pci.c | 10 ++++++++++
drivers/hwtracing/stm/core.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
--
2.14.1
[toc] | [next] | [standalone]
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2017-09-19 17:50 +0200 |
| Subject | [GIT PULL 1/3] stm class: Fix a use-after-free |
| Message-ID | <ursWC-7h8-19@gated-at.bofh.it> |
| In reply to | #1735025 |
For reasons unknown, the stm_source removal path uses device_destroy()
to kill the underlying device object. Because device_destroy() uses
devt to look for the device to destroy and the fact that stm_source
devices don't have one (or all have the same one), it just picks the
first device in the class, which may well be the wrong one.
That is, loading stm_console and stm_heartbeat and then removing both
will die in dereferencing a freed object.
Since this should have been device_unregister() in the first place,
use it instead of device_destroy().
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: 7bd1d4093c2 ("stm class: Introduce an abstraction for System Trace Module devices")
Cc: stable@vger.kernel.org
---
drivers/hwtracing/stm/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index 9414900575..f129869e05 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -1119,7 +1119,7 @@ void stm_source_unregister_device(struct stm_source_data *data)
stm_source_link_drop(src);
- device_destroy(&stm_source_class, src->dev.devt);
+ device_unregister(&src->dev);
}
EXPORT_SYMBOL_GPL(stm_source_unregister_device);
--
2.14.1
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <greg@kroah.com> |
|---|---|
| Date | 2017-09-22 10:30 +0200 |
| Subject | Re: [GIT PULL 1/3] stm class: Fix a use-after-free |
| Message-ID | <usrvr-3Q3-1@gated-at.bofh.it> |
| In reply to | #1735027 |
On Tue, Sep 19, 2017 at 06:47:40PM +0300, Alexander Shishkin wrote:
> For reasons unknown, the stm_source removal path uses device_destroy()
> to kill the underlying device object. Because device_destroy() uses
> devt to look for the device to destroy and the fact that stm_source
> devices don't have one (or all have the same one), it just picks the
> first device in the class, which may well be the wrong one.
>
> That is, loading stm_console and stm_heartbeat and then removing both
> will die in dereferencing a freed object.
>
> Since this should have been device_unregister() in the first place,
> use it instead of device_destroy().
>
> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Fixes: 7bd1d4093c2 ("stm class: Introduce an abstraction for System Trace Module devices")
> Cc: stable@vger.kernel.org
> ---
> drivers/hwtracing/stm/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Ugh, I just applied these as patches, and didn't do the git pull, sorry
about that, my fault.
But really, patches for short series are really easy for me to do...
thanks,
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2017-09-22 11:10 +0200 |
| Subject | Re: [GIT PULL 1/3] stm class: Fix a use-after-free |
| Message-ID | <uss8b-4hz-61@gated-at.bofh.it> |
| In reply to | #1737260 |
Greg KH <greg@kroah.com> writes:
> On Tue, Sep 19, 2017 at 06:47:40PM +0300, Alexander Shishkin wrote:
>> For reasons unknown, the stm_source removal path uses device_destroy()
>> to kill the underlying device object. Because device_destroy() uses
>> devt to look for the device to destroy and the fact that stm_source
>> devices don't have one (or all have the same one), it just picks the
>> first device in the class, which may well be the wrong one.
>>
>> That is, loading stm_console and stm_heartbeat and then removing both
>> will die in dereferencing a freed object.
>>
>> Since this should have been device_unregister() in the first place,
>> use it instead of device_destroy().
>>
>> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
>> Fixes: 7bd1d4093c2 ("stm class: Introduce an abstraction for System Trace Module devices")
>> Cc: stable@vger.kernel.org
>> ---
>> drivers/hwtracing/stm/core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Ugh, I just applied these as patches, and didn't do the git pull, sorry
> about that, my fault.
No worries, I'm fine either way.
> But really, patches for short series are really easy for me to do...
Sure, that's one reason why I sent it like that, so you get to choose.
Thanks,
--
Alex
[toc] | [prev] | [next] | [standalone]
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2017-09-19 18:00 +0200 |
| Subject | [GIT PULL 3/3] intel_th: pci: Add Lewisburg PCH support |
| Message-ID | <urt6i-7kk-19@gated-at.bofh.it> |
| In reply to | #1735025 |
This adds Intel(R) Trace Hub PCI ID for Lewisburg PCH.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: stable@vger.kernel.org
---
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 00ee60d978..c2a2ce8ee5 100644
--- a/drivers/hwtracing/intel_th/pci.c
+++ b/drivers/hwtracing/intel_th/pci.c
@@ -143,6 +143,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,
},
+ {
+ /* Lewisburg PCH */
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa1a6),
+ .driver_data = (kernel_ulong_t)0,
+ },
{
/* Gemini Lake */
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x318e),
--
2.14.1
[toc] | [prev] | [next] | [standalone]
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2017-09-19 18:00 +0200 |
| Subject | [GIT PULL 2/3] intel_th: pci: Add Cedar Fork PCH support |
| Message-ID | <urt6j-7kk-29@gated-at.bofh.it> |
| In reply to | #1735025 |
This adds Intel(R) Trace Hub PCI ID for Cedar Fork PCH.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: stable@vger.kernel.org
---
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 bc9cebc305..00ee60d978 100644
--- a/drivers/hwtracing/intel_th/pci.c
+++ b/drivers/hwtracing/intel_th/pci.c
@@ -158,6 +158,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9da6),
.driver_data = (kernel_ulong_t)&intel_th_2x,
},
+ {
+ /* Cedar Fork PCH */
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x18e1),
+ .driver_data = (kernel_ulong_t)&intel_th_2x,
+ },
{ 0 },
};
--
2.14.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web