Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1319715
| Path | csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Kamal Mostafa <kamal@canonical.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.2.y-ckt 087/268] PCI: Fix minimum allocation address overwrite |
| Date | Wed, 27 Jan 2016 21:40:03 +0100 |
| Message-ID | <qVF2H-Kd-37@gated-at.bofh.it> (permalink) |
| References | <qVF2F-Kd-3@gated-at.bofh.it> |
| X-Mailer | git-send-email 1.9.1 |
| X-Extended-Stable | 4.2 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 54 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>, Bjorn Helgaas <bhelgaas@google.com>, Kamal Mostafa <kamal@canonical.com> |
| X-Original-Date | Wed, 27 Jan 2016 12:32:28 -0800 |
| X-Original-Message-ID | <1453926929-17663-88-git-send-email-kamal@canonical.com> |
| X-Original-References | <1453926929-17663-1-git-send-email-kamal@canonical.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1319715 |
Show key headers only | View raw
4.2.8-ckt3 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
commit 3460baa620685c20f5ee19afb6d99d26150c382c upstream.
Commit 36e097a8a297 ("PCI: Split out bridge window override of minimum
allocation address") claimed to do no functional changes but unfortunately
did: The "min" variable is altered. At least the AVM A1 PCMCIA adapter was
no longer detected, breaking ISDN operation.
Use a local copy of "min" to restore the previous behaviour.
[bhelgaas: avoid gcc "?:" extension for portability and readability]
Fixes: 36e097a8a297 ("PCI: Split out bridge window override of minimum allocation address")
Signed-off-by: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/pci/bus.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index d3346d2..89b3bef 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -140,6 +140,8 @@ static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res,
type_mask |= IORESOURCE_TYPE_BITS;
pci_bus_for_each_resource(bus, r, i) {
+ resource_size_t min_used = min;
+
if (!r)
continue;
@@ -163,12 +165,12 @@ static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res,
* overrides "min".
*/
if (avail.start)
- min = avail.start;
+ min_used = avail.start;
max = avail.end;
/* Ok, try it out.. */
- ret = allocate_resource(r, res, size, min, max,
+ ret = allocate_resource(r, res, size, min_used, max,
align, alignf, alignf_data);
if (ret == 0)
return 0;
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 4.2.y-ckt 087/268] PCI: Fix minimum allocation address overwrite Kamal Mostafa <kamal@canonical.com> - 2016-01-27 21:40 +0100
csiph-web