summaryrefslogtreecommitdiffstats
path: root/include/linux/cec-funcs.h
diff options
context:
space:
mode:
authorHans Verkuil2016-08-02 13:13:57 +0200
committerMauro Carvalho Chehab2016-08-22 18:14:21 +0200
commit2ab25d35a91098ef0f42d478cc37f6a5591a4ab0 (patch)
treed23b665dc4fb9977e9abf443626279a3364a0d5a /include/linux/cec-funcs.h
parent[media] cec: rename cec_devnode fhs_lock to just lock (diff)
downloadkernel-qcow2-linux-2ab25d35a91098ef0f42d478cc37f6a5591a4ab0.tar.gz
kernel-qcow2-linux-2ab25d35a91098ef0f42d478cc37f6a5591a4ab0.tar.xz
kernel-qcow2-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/linux/cec-funcs.h')
0 files changed, 0 insertions, 0 deletions