Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339998
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch V3 04/28] x86/perf/intel/uncore: Add sanity checks for pci dev package id |
| Date | 2016-02-22 23:30 +0100 |
| Message-ID | <r579p-4ce-47@gated-at.bofh.it> (permalink) |
| References | <r579n-4ce-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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) {
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[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
csiph-web