Patchwork [51/60] libpciaccess: upgrade to 0.13

login
register
mail settings
Submitter Shane Wang
Date March 16, 2012, 12:52 a.m.
Message ID <44c7560e95e96bf6600b39eb4ae109a5047c0b43.1331859047.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/23589/
State New
Headers show

Comments

Shane Wang - March 16, 2012, 12:52 a.m.
The patch libpciaccess-0.12.902/fix_deletion_of_last_handle.patch is removed because it is in the upstream.

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 .../fix_deletion_of_last_handle.patch              |   51 --------------------
 ...bpciaccess_0.12.902.bb => libpciaccess_0.13.bb} |    6 +--
 2 files changed, 2 insertions(+), 55 deletions(-)
 delete mode 100644 meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch
 rename meta/recipes-graphics/xorg-lib/{libpciaccess_0.12.902.bb => libpciaccess_0.13.bb} (64%)

Patch

diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch b/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch
deleted file mode 100644
index 1933f45..0000000
--- a/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch
+++ /dev/null
@@ -1,51 +0,0 @@ 
-Upstream-Status: Backport
-
-The below patch is from
-http://cgit.freedesktop.org/xorg/lib/libpciaccess/commit/?id=a798395a1bfd9d06d40e2d8d14377a156c94429a
-It would appear in the next .tar.bz2 release.
-
-------------------------------
-
-commit a798395a1bfd9d06d40e2d8d14377a156c94429a
-Author: Daniel Drake <dsd@laptop.org>
-Date:   Fri Nov 25 12:28:48 2011 -0600
-
-    delete_io_handle: fix deletion of last handle
-    
-    When num_ios goes from 1 to 0, a realloc(ios, 0); call is made.
-    This is equivalent to free(ios) and NULL is returned.
-    
-    However, the previous logic in the code incorrectly discards this NULL
-    return value. When we next call new_io_handle(), realloc(ios, X) is
-    called with "ios" pointing to freed memory. This causes glibc to abort.
-    
-    Correct this logic to detect the 1-to-0 case and handle it correctly.
-    Other cases are unchanged; there is still value in checking the
-    return value from realloc() as it also returns NULL on error.
-    
-    Signed-off-by: Daniel Drake <dsd@laptop.org>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-diff --git a/src/common_io.c b/src/common_io.c
-index f1319f8..5b35e07 100644
---- a/src/common_io.c
-+++ b/src/common_io.c
-@@ -64,10 +64,15 @@ delete_io_handle(struct pci_io_handle *handle)
-         }
-     }
- 
--    new = realloc(ios, sizeof(struct pci_io_handle) * (num_ios - 1));
--    if (new)
--        ios = new;
-     num_ios--;
-+    if (num_ios) {
-+        new = realloc(ios, sizeof(struct pci_io_handle) * num_ios);
-+        if (new)
-+            ios = new;
-+    } else {
-+        free(ios);
-+        ios = NULL;
-+    }
- }
- 
- _pci_hidden void
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess_0.12.902.bb b/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.bb
similarity index 64%
rename from meta/recipes-graphics/xorg-lib/libpciaccess_0.12.902.bb
rename to meta/recipes-graphics/xorg-lib/libpciaccess_0.13.bb
index 5043634..6c6e47c 100644
--- a/meta/recipes-graphics/xorg-lib/libpciaccess_0.12.902.bb
+++ b/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.bb
@@ -5,8 +5,6 @@  PCI bus and devices in a platform-independant way."
 
 require xorg-lib-common.inc
 
-SRC_URI += "file://fix_deletion_of_last_handle.patch"
-
 LICENSE = "MIT & MIT-style"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de01cb89a769dc657d4c321c209ce4fc"
 
@@ -14,5 +12,5 @@  PR = "r0"
 
 DEPENDS += "xproto virtual/libx11"
 
-SRC_URI[md5sum] = "f1db198398a8a1143822acc230843e8c"
-SRC_URI[sha256sum] = "0861d5bf68b598baa307e5c9b06dfd38ae03096b46e36b236106517bcd14b63a"
+SRC_URI[md5sum] = "2604307ba43c76ee8aec11ea137ae1e8"
+SRC_URI[sha256sum] = "24368520b0947487ec73729e3c97c95f3d9bf83704a910bb0abe1d5a63df32fd"