WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] pci: fix PCI resource reservation opt

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pci: fix PCI resource reservation option parsing
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Mar 2010 03:05:18 -0700
Delivery-date: Thu, 25 Mar 2010 03:05:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1269511203 0
# Node ID 10eae161c15390fdf31cd210b36540d608c46801
# Parent  ca0b8d76d649756156fbe5d471dfbae266b4f7be
pci: fix PCI resource reservation option parsing

Start looking for the second '+' after the first one (rather than at
the beginning again). Also fail if second string cannot be parsed.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/pci/reserve.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff -r ca0b8d76d649 -r 10eae161c153 drivers/pci/reserve.c
--- a/drivers/pci/reserve.c     Thu Mar 25 09:59:38 2010 +0000
+++ b/drivers/pci/reserve.c     Thu Mar 25 10:00:03 2010 +0000
@@ -64,16 +64,11 @@ static int pci_reserve_parse_one(const c
        p = strchr(str, '+');
        if (p == NULL)
                return -EINVAL;
-       p++;
-       if (pci_reserve_parse_size(p, io_size, mem_size))
+       if (pci_reserve_parse_size(++p, io_size, mem_size))
                return -EINVAL;
 
-       p = strchr(str, '+');
-       if (p != NULL) {
-               p++;
-               pci_reserve_parse_size(p, io_size, mem_size);
-       }
-       return 0;
+       p = strchr(p, '+');
+       return p ? pci_reserve_parse_size(p + 1, io_size, mem_size) : 0;
 }
 
 static unsigned long pci_reserve_size(struct pci_bus *pbus, int flags)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pci: fix PCI resource reservation option parsing, Xen patchbot-linux-2.6.18-xen <=