rpms/libraw1394/devel libraw1394-memset-and-patch-up-leaks-git.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 libraw1394.spec, 1.41, 1.42 sources, 1.10, 1.11 libraw1394-juju-bitfield-update.patch, 1.1, NONE libraw1394-juju-munmap-correct-max_packet_size.patch, 1.1, NONE libraw1394-juju-no-double-free-on-shutdown.patch, 1.2, NONE libraw1394-juju.patch, 1.7, NONE
Jarod Wilson (jwilson)
fedora-extras-commits at redhat.com
Tue Jun 17 15:53:54 UTC 2008
Author: jwilson
Update of /cvs/pkgs/rpms/libraw1394/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1468
Modified Files:
.cvsignore libraw1394.spec sources
Added Files:
libraw1394-memset-and-patch-up-leaks-git.patch
Removed Files:
libraw1394-juju-bitfield-update.patch
libraw1394-juju-munmap-correct-max_packet_size.patch
libraw1394-juju-no-double-free-on-shutdown.patch
libraw1394-juju.patch
Log Message:
* Tue Jun 17 2008 Jarod Wilson <jwilson at redhat.com> - 2.0.0-0.1.20080430_git
- Update to pre-2.0.0 git tree, which features merged "juju" firewire
stack support, enabled simultaneously with classic ieee1394 support
libraw1394-memset-and-patch-up-leaks-git.patch:
--- NEW FILE libraw1394-memset-and-patch-up-leaks-git.patch ---
Originally submitted via Red Hat bugzilla by Philippe Troin:
https://bugzilla.redhat.com/show_bug.cgi?id=451727
Description:
While trying to track down some crashes in kino, I found the following problems
with libraw1394:
* There is a DIR* leak in raw1394_set_port().
* Lots of data structures are not fully initialized when calling IEEE1394
ioctl()s. These cause valgrind errors (benign, as valgrind does not know
how to interpret all ioctls. However these also cause kino to crash in
libraw1394. I've added a bunch of memset()s to prevent this problem from
happening.
Author: Philippe Troin <phil at fifi.org>
Forward-ported to libraw1394 git tree by Jarod Wilson.
Signed-off-by: Jarod Wilson <jwilson at redhat.com>
--
src/fw-iso.c | 2 ++
src/fw.c | 15 ++++++++++++++-
tools/testlibraw.c | 1 +
3 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/fw-iso.c b/src/fw-iso.c
index 471d981..a1794c3 100644
--- a/src/fw-iso.c
+++ b/src/fw-iso.c
@@ -401,6 +401,7 @@ iso_init(fw_handle_t handle, int type,
}
handle->iso.closure.func = handle_iso_event;
+ memset(&ep, 0, sizeof(ep));
ep.events = EPOLLIN;
ep.data.ptr = &handle->iso.closure;
if (epoll_ctl(handle->epoll_fd, EPOLL_CTL_ADD,
@@ -411,6 +412,7 @@ iso_init(fw_handle_t handle, int type,
return -1;
}
+ memset(&create, 0, sizeof(create));
create.type = type;
create.channel = channel;
create.speed = speed;
diff --git a/src/fw.c b/src/fw.c
index 1322fe2..3c61385 100644
--- a/src/fw.c
+++ b/src/fw.c
@@ -149,6 +149,8 @@ scan_devices(fw_handle_t handle)
fd = open(filename, O_RDWR);
if (fd < 0)
continue;
+ memset(&get_info, 0, sizeof(get_info));
+ memset(&reset, 0, sizeof(reset));
get_info.version = FW_CDEV_VERSION;
get_info.rom = 0;
get_info.rom_length = 0;
@@ -404,7 +406,10 @@ fw_handle_t fw_new_handle(void)
struct epoll_event ep;
int i;
+ memset(&ep, 0, sizeof(ep));
+
handle = malloc(sizeof *handle);
+ memset(handle, 0, sizeof(*handle));
handle->tag_handler = default_tag_handler;
handle->arm_tag_handler = default_arm_tag_handler;
@@ -580,6 +585,8 @@ int fw_set_port(fw_handle_t handle, int port)
if (fd < 0)
continue;
+ memset(&get_info, 0, sizeof(get_info));
+ memset(&reset, 0, sizeof(reset));
get_info.version = FW_CDEV_VERSION;
get_info.rom = 0;
get_info.rom_length = 0;
@@ -603,10 +610,12 @@ int fw_set_port(fw_handle_t handle, int port)
sizeof handle->devices[i].filename);
handle->devices[i].closure.func = handle_device_event;
+ memset(&ep, 0, sizeof(ep));
ep.events = EPOLLIN;
ep.data.ptr = &handle->devices[i].closure;
if (epoll_ctl(handle->epoll_fd, EPOLL_CTL_ADD, fd, &ep) < 0) {
close(fd);
+ closedir(dir);
return -1;
}
@@ -621,6 +630,8 @@ int fw_set_port(fw_handle_t handle, int port)
i++;
}
+ closedir(dir);
+
return 0;
}
@@ -1220,6 +1231,7 @@ fw_start_fcp_listen(fw_handle_t handle)
closure->callback = handle_fcp_request;
+ memset(&request, 0, sizeof(request));
request.offset = CSR_REGISTER_BASE + CSR_FCP_COMMAND;
request.length = CSR_FCP_END - CSR_FCP_COMMAND;
request.closure = ptr_to_u64(closure);
@@ -1256,6 +1268,7 @@ fw_get_config_rom(fw_handle_t handle, quadlet_t *buffer,
struct fw_cdev_get_info get_info;
int err;
+ memset(&get_info, 0, sizeof(get_info));
get_info.version = FW_CDEV_VERSION;
get_info.rom = ptr_to_u64(buffer);
get_info.rom_length = buffersize;
@@ -1284,7 +1297,7 @@ fw_bandwidth_modify (raw1394handle_t handle,
if (bandwidth == 0)
return 0;
-
+
addr = CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE;
/* Read current bandwidth usage from IRM. */
result = raw1394_read (handle, raw1394_get_irm_id (handle), addr,
diff --git a/tools/testlibraw.c b/tools/testlibraw.c
index 2f02a6d..efd87ad 100644
--- a/tools/testlibraw.c
+++ b/tools/testlibraw.c
@@ -202,6 +202,7 @@ int main(int argc, char **argv)
read_topology_map(handle);
printf("testing config rom stuff\n");
+ memset(rom, 0, sizeof(rom));
retval=raw1394_get_config_rom(handle, rom, 0x100, &rom_size, &rom_version);
printf("get_config_rom returned %d, romsize %d, rom_version %d\n",retval,rom_size,rom_version);
printf("here are the first 10 quadlets:\n");
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/devel/.cvsignore,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- .cvsignore 19 Oct 2007 13:36:16 -0000 1.9
+++ .cvsignore 17 Jun 2008 15:53:04 -0000 1.10
@@ -2,3 +2,4 @@
libraw1394-1.2.1.tar.gz
fw-device-cdev.h
libraw1394-1.3.0.tar.gz
+libraw1394-2.0.0-20080430_git.tar.bz2
Index: libraw1394.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/devel/libraw1394.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- libraw1394.spec 28 Apr 2008 22:09:15 -0000 1.41
+++ libraw1394.spec 17 Jun 2008 15:53:04 -0000 1.42
@@ -1,23 +1,27 @@
+%define gitrev 20080430_git
+
Summary: Library providing low-level IEEE-1394 access
Name: libraw1394
-Version: 1.3.0
-Release: 6%{?dist}
+Version: 2.0.0
+Release: 0.1.%{gitrev}%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
-Source: http://www.linux1394.org/dl/libraw1394-%{version}.tar.gz
+#Source: http://www.linux1394.org/dl/libraw1394-%{version}.tar.gz
+# Pre-2.0.0 snapshot generated from git://dennedy.org/libraw1394.git
+Source: %{name}-%{version}-%{gitrev}.tar.bz2
URL: http://www.linux1394.org/
ExcludeArch: s390 s390x
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
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
+Patch0: libraw1394-memset-and-patch-up-leaks-git.patch
%description
The libraw1394 library provides direct access to the IEEE-1394 bus through
-the Linux 1394 subsystem's raw1394 user space interface.
+the Linux 1394 subsystem's raw1394 user space interface. Support for both
+the classic ieee1394 and new firewire linux driver stacks is included, with
+run-time detection of the active stack. Fedora comes with the firewire stack
+by default.
%package devel
Summary: Development libs for libraw1394
@@ -31,16 +35,10 @@
%setup -q
%patch0 -p1
-%patch1 -p1 -b .free
-%patch2 -p1 -b .bitf
-%patch3 -p1 -b .munmap
%build
-aclocal
-autoheader
-autoconf
-automake
-%configure --disable-static --with-juju-dir=$PWD/..
+./autogen.sh
+%configure --disable-static
make %{?_smp_mflags}
%install
@@ -76,6 +74,14 @@
%changelog
+* Tue Jun 17 2008 Jarod Wilson <jwilson at redhat.com> - 2.0.0-0.1.20080430_git
+- Update to pre-2.0.0 git tree, which features merged "juju" firewire
+ stack support, enabled simultaneously with classic ieee1394 support
+
+* Tue Jun 17 2008 Jarod Wilson <jwilson at redhat.com> - 1.3.0-7
+- Fully initialize data structures and plug dir leak. Resolves
+ crashes when used with kino (Philippe Troin, #451727)
+
* Mon Apr 28 2008 Jarod Wilson <jwilson at redhat.com> - 1.3.0-6
- Unmap the correct memory range on iso receive teardown, fixes
segfault on exit from dvgrab (Mladen Kuntner, #444354)
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/devel/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources 19 Oct 2007 13:36:16 -0000 1.10
+++ sources 17 Jun 2008 15:53:04 -0000 1.11
@@ -1 +1 @@
-c5d9ab62bd25dba96af010b3471e816a libraw1394-1.3.0.tar.gz
+6ef4d6b593d919c36d65856f19be34b5 libraw1394-2.0.0-20080430_git.tar.bz2
--- libraw1394-juju-bitfield-update.patch DELETED ---
--- libraw1394-juju-munmap-correct-max_packet_size.patch DELETED ---
--- libraw1394-juju-no-double-free-on-shutdown.patch DELETED ---
--- libraw1394-juju.patch DELETED ---
More information about the fedora-extras-commits
mailing list