Skip to content
Commit afce6728 authored by Amir Samuelov's avatar Amir Samuelov Committed by Gerrit - the friendly Code Review server
Browse files

spcom: avoid race condition when handling commands



The spcom allows only one owner per channel, so only one app can open()
a channel char device at a time.
However, the channel owner process might share the channel file
descriptor (fd) with other threads, that might write() concurrently
a command to spcom, that can cause a race.
Add a mutex to "serialize" handling of the commands.

Change-Id: Ief9c6c48a862444dfff66d14d2317568cd6e81e6
Signed-off-by: default avatarAmir Samuelov <amirs@codeaurora.org>
parent 90355b6e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment