Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339998 > unrolled thread
| Started by | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| First post | 2016-02-22 23:30 +0100 |
| Last post | 2016-02-29 12:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[patch V3 04/28] x86/perf/intel/uncore: Add sanity checks for pci dev package id Thomas Gleixner <tglx@linutronix.de> - 2016-02-22 23:30 +0100
[tip:perf/core] perf/x86/intel/uncore: Add sanity checks for PCI dev package id tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-02-29 12:10 +0100
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2016-02-22 23:30 +0100 |
| Subject | [patch V3 04/28] x86/perf/intel/uncore: Add sanity checks for pci dev package id |
| Message-ID | <r579p-4ce-47@gated-at.bofh.it> |
The storage array is size limited, but misses a sanity check
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
===================================================================
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -882,7 +882,7 @@ static int uncore_pci_probe(struct pci_d
int phys_id, ret;
phys_id = uncore_pcibus_to_physid(pdev->bus);
- if (phys_id < 0)
+ if (phys_id < 0 || phys_id >= UNCORE_SOCKET_MAX)
return -ENODEV;
if (UNCORE_PCI_DEV_TYPE(id->driver_data) == UNCORE_EXTRA_PCI_DEV) {
[toc] | [next] | [standalone]
| From | tip-bot for Thomas Gleixner <tipbot@zytor.com> |
|---|---|
| Date | 2016-02-29 12:10 +0100 |
| Subject | [tip:perf/core] perf/x86/intel/uncore: Add sanity checks for PCI dev package id |
| Message-ID | <r7tSa-2et-25@gated-at.bofh.it> |
| In reply to | #1339998 |
Commit-ID: 83f8ebd2eb459b21e8e74d43c75e1be666ec8b97
Gitweb: http://git.kernel.org/tip/83f8ebd2eb459b21e8e74d43c75e1be666ec8b97
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 22 Feb 2016 22:19:10 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 29 Feb 2016 09:35:14 +0100
perf/x86/intel/uncore: Add sanity checks for PCI dev package id
The storage array is size limited, but misses a sanity check
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Harish Chegondi <harish.chegondi@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/20160222221010.929967806@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/events/intel/uncore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 25e6203..42ea435 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -882,7 +882,7 @@ static int uncore_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id
int phys_id, ret;
phys_id = uncore_pcibus_to_physid(pdev->bus);
- if (phys_id < 0)
+ if (phys_id < 0 || phys_id >= UNCORE_SOCKET_MAX)
return -ENODEV;
if (UNCORE_PCI_DEV_TYPE(id->driver_data) == UNCORE_EXTRA_PCI_DEV) {
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web