diff options
author | Peter Hurley <phurley@charter.net> | 2010-04-16 14:15:40 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-04-17 10:36:00 +0200 |
commit | b15039ceb814ee4c685deec554f342480391b775 (patch) | |
tree | 923f61f6d4180985efd82a90f80542df5e31ba15 | |
parent | f806f3d0de39fa405b63b7dbea84fc79b97d3079 (diff) | |
download | libraw1394-b15039ceb814ee4c685deec554f342480391b775.tar.gz |
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>
-rw-r--r-- | src/fw.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |