diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-08-02 13:13:57 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-22 18:14:21 +0200 |
commit | 2ab25d35a91098ef0f42d478cc37f6a5591a4ab0 (patch) | |
tree | d23b665dc4fb9977e9abf443626279a3364a0d5a /include | |
parent | [media] cec: rename cec_devnode fhs_lock to just lock (diff) | |
download | linux-2ab25d35a91098ef0f42d478cc37f6a5591a4ab0.tar.xz linux-2ab25d35a91098ef0f42d478cc37f6a5591a4ab0.zip |
[media] cec: improve locking
- The global lock was used in cec_get_device when it should have
used the devnode lock.
- cec_put_device also took the global lock, but since the release
function takes that lock as well this could lead to a deadlock.
Just don't take the lock here since there is no reason for it.
- cec_devnode_register() should take the global lock when clearing
the bit in the global bitmap.
- In cec_devnode_unregister() place the devnode->(un)register tests
and assignments under the devnode lock as well: this has to be
in a critical block.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions