- Fix overlooked device HUP using firewire driver stack

epel9
Jarod Wilson 15 years ago
parent 8e7a77a0fe
commit 1ba11da33e

@ -0,0 +1,36 @@
From b15039ceb814ee4c685deec554f342480391b775 Mon Sep 17 00:00:00 2001
From: Peter Hurley <phurley@charter.net>
Date: Fri, 16 Apr 2010 14:15:40 -0400
Subject: [PATCH] Fix for overlooked device HUP with 'firewire' stack
When EPOLLHUP event is received in fw_loop_iterate(), it is or'd
with EPOLLERR. The EPOLLHUP event was then overlooked in
handle_device_event() with unpredictable-but-generally bad results.
This problem has been rediscovered several times.
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/13330
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/13779
Reported-by: B.J. Buchalter <bj@mhlabs.com>
Reported-by: Michael Thireos <mthireos@vanteon.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
src/fw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/fw.c b/src/fw.c
index 7277253..d525ac9 100644
--- a/src/fw.c
+++ b/src/fw.c
@@ -262,7 +262,7 @@ handle_device_event(raw1394handle_t handle,
int i;
i = device - fwhandle->devices;
- if (events == EPOLLHUP)
+ if (events & EPOLLHUP)
return handle_lost_device(fwhandle, i);
len = read(fwhandle->devices[i].fd,
--
1.7.0.5

@ -1,11 +1,12 @@
Summary: Library providing low-level IEEE-1394 access Summary: Library providing low-level IEEE-1394 access
Name: libraw1394 Name: libraw1394
Version: 2.0.5 Version: 2.0.5
Release: 1%{?dist} Release: 2%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.kernel.org/pub/linux/libs/ieee1394/%{name}-%{version}.tar.gz Source: http://www.kernel.org/pub/linux/libs/ieee1394/%{name}-%{version}.tar.gz
URL: http://www.dennedy.org/libraw1394/ URL: http://www.dennedy.org/libraw1394/
Patch: libraw1394-fix-missed-hup-signal.patch
ExcludeArch: s390 s390x ExcludeArch: s390 s390x
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf automake libtool kernel-headers BuildRequires: autoconf automake libtool kernel-headers
@ -27,6 +28,7 @@ Development libraries needed to build applications against libraw1394.
%prep %prep
%setup -q %setup -q
%patch -p1
%build %build
%configure --disable-static %configure --disable-static
@ -65,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Mon Apr 19 2010 Jarod Wilson <jarod@redhat.com> 2.0.5-2
- Fix overlooked device HUP using firewire driver stack
* Thu Jan 7 2010 Jay Fenlason <fenlason@redhat.com> 2.0.5-1 * Thu Jan 7 2010 Jay Fenlason <fenlason@redhat.com> 2.0.5-1
- New upstream version - New upstream version

Loading…
Cancel
Save