[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] pciback: fix error return code in xen_pcibk_attach()


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Fri, 25 Jul 2014 06:33:03 +0000
  • Delivery-date: Fri, 25 Jul 2014 06:33:17 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
# Date 1406269378 -7200
# Node ID 52f54ddbf4495d75384fc00caa075c42d4a6c3fd
# Parent  ca51c3ea6ffd43202ba0435f2cdb012e28cae09e
pciback: fix error return code in xen_pcibk_attach()

Fix to return -EFAULT from the error handling case instead of 0 when
version mismatch with pcifront.

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Use -EILSEQ/-ENODATA instead of -EFAULT.

Signed-off-by Jan Beulich <jbeulich@xxxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r ca51c3ea6ffd -r 52f54ddbf449 drivers/xen/pciback/xenbus.c
--- a/drivers/xen/pciback/xenbus.c      Fri Jul 04 12:10:22 2014 +0200
+++ b/drivers/xen/pciback/xenbus.c      Fri Jul 25 08:22:58 2014 +0200
@@ -145,7 +145,8 @@ static int pciback_attach(struct pciback
        }
 
        if (magic == NULL || strcmp(magic, XEN_PCI_MAGIC) != 0) {
-               xenbus_dev_fatal(pdev->xdev, -EFAULT,
+               err = magic ? -EILSEQ : -ENODATA;
+               xenbus_dev_fatal(pdev->xdev, err,
                                 "version mismatch (%s/%s) with pcifront - "
                                 "halting pciback",
                                 magic, XEN_PCI_MAGIC);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.