diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-08-15 18:15:16 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-10-15 16:21:08 -0400 |
commit | f22e52b89e036fd12b9374212da8b5d4a447bd1e (patch) | |
tree | 84e8cb2fca80197dc1b2afee85d2c46fd8446af0 /drivers/ieee1394/video1394.c | |
parent | ddfb908d3f905dbb5964d6fbf783e69c417eb13e (diff) |
ieee1394: raw1394: make write() thread-safe
Application programs should use a libraw1394 handle only in a single
thread. The raw1394 driver was apparently relying on this, because it
did nothing to protect its fi->state variable from corruption due to
concurrent accesses.
We now serialize the fi->state accesses. This affects the write() path.
We re-use the state_mutex which was introduced to protect fi->iso_state
accesses in the ioctl() path. These paths and accesses are independent
of each other, hence separate mutexes could be used. But I don't see
much benefit in that.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/video1394.c')
0 files changed, 0 insertions, 0 deletions