From 37839e2a1748f4094ba5bf6cbdb0f9685f90c579 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Mon, 28 Apr 2008 22:09:15 +0000 Subject: [PATCH] - Unmap the correct memory range on iso receive teardown, fixes segfault on exit from dvgrab (Mladen Kuntner, #444354) --- ...-juju-munmap-correct-max_packet_size.patch | 21 +++++++++++++++++++ libraw1394.spec | 10 +++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 libraw1394-juju-munmap-correct-max_packet_size.patch diff --git a/libraw1394-juju-munmap-correct-max_packet_size.patch b/libraw1394-juju-munmap-correct-max_packet_size.patch new file mode 100644 index 0000000..8903436 --- /dev/null +++ b/libraw1394-juju-munmap-correct-max_packet_size.patch @@ -0,0 +1,21 @@ +diff -Naurp libraw1394-1.3.0/juju/raw1394-iso.c libraw1394-1.3.0.fix/juju/raw1394-iso.c +--- libraw1394-1.3.0/juju/raw1394-iso.c 2008-04-28 13:57:30.000000000 -0400 ++++ libraw1394-1.3.0.fix/juju/raw1394-iso.c 2008-04-28 14:06:21.000000000 -0400 +@@ -421,7 +421,7 @@ iso_init(raw1394handle_t handle, int typ + } + + handle->iso.buffer = +- mmap(NULL, buf_packets * max_packet_size, ++ mmap(NULL, buf_packets * handle->iso.max_packet_size, + prot, MAP_SHARED, handle->iso.fd, 0); + + if (handle->iso.buffer == MAP_FAILED) { +@@ -432,7 +432,7 @@ iso_init(raw1394handle_t handle, int typ + } + + handle->iso.buffer_end = handle->iso.buffer + +- buf_packets * max_packet_size; ++ buf_packets * handle->iso.max_packet_size; + handle->iso.head = handle->iso.buffer; + handle->iso.tail = handle->iso.buffer; + handle->iso.first_payload = handle->iso.buffer; diff --git a/libraw1394.spec b/libraw1394.spec index 42acbe1..48d6fe0 100644 --- a/libraw1394.spec +++ b/libraw1394.spec @@ -1,7 +1,7 @@ Summary: Library providing low-level IEEE-1394 access Name: libraw1394 Version: 1.3.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://www.linux1394.org/dl/libraw1394-%{version}.tar.gz @@ -13,6 +13,7 @@ BuildRequires: autoconf automake libtool kernel-headers Patch0: libraw1394-juju.patch Patch1: libraw1394-juju-no-double-free-on-shutdown.patch Patch2: libraw1394-juju-bitfield-update.patch +Patch3: libraw1394-juju-munmap-correct-max_packet_size.patch %description The libraw1394 library provides direct access to the IEEE-1394 bus through @@ -29,9 +30,10 @@ Development libraries needed to build applications against libraw1394. %prep %setup -q -%patch0 -p1 -b .juju +%patch0 -p1 %patch1 -p1 -b .free %patch2 -p1 -b .bitf +%patch3 -p1 -b .munmap %build aclocal @@ -74,6 +76,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 28 2008 Jarod Wilson - 1.3.0-6 +- Unmap the correct memory range on iso receive teardown, fixes + segfault on exit from dvgrab (Mladen Kuntner, #444354) + * Tue Feb 26 2008 Jarod Wilson - 1.3.0-5 - Update license and kill an errant tab (#226039)