Files
linux/drivers
Stefan Richter 8449fc3ae5 ieee1394: dv1394: fix possible deadlock in multithreaded clients
Fix a possible though highly unlikely deadlock:

Thread A:                  Thread B:
 - acquire mmap_sem         - dv1394_ioctl/read/write()
 - dv1394_mmap()            - acquire video->mtx
 - acquire video->mtx       - copy_to/from_user(), possible page fault:
                              acquire mmap_sem

The simplest fix is to use mutex_trylock() instead of mutex_lock() in
dv1394_mmap().  This changes the behavior under contention in a way
which is visible to userspace clients.  However, my guess is that no
clients exist which use mmap vs. ioctl/read/write on the dv1394
character device file interface in concurrent threads.

Reported-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-10-31 08:48:26 +01:00
..
2008-08-18 21:40:04 +02:00
2008-08-26 00:19:28 +10:00
2008-09-30 09:57:22 +02:00
2008-10-09 15:33:57 +02:00
2008-10-03 09:18:17 -07:00
2008-10-03 21:55:55 +02:00
2008-08-04 12:51:06 +09:00
2008-08-13 17:33:00 -07:00