From: Stefan Richter Date: Fri, 15 Aug 2008 22:15:16 +0000 (+0200) Subject: ieee1394: raw1394: make write() thread-safe X-Git-Tag: v2.6.28-rc1~277^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f22e52b89e036fd12b9374212da8b5d4a447bd1e;p=pandora-kernel.git 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 --- Reading git-diff-tree failed