From: Hans Verkuil <hans.verkuil@xxxxxxxxx> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- Documentation/video4linux/v4l2-framework.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index c2e6591..33ac07a 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt @@ -661,6 +661,14 @@ wait_prepare and wait_finish. The implementation of a hotplug disconnect should also take the lock before calling v4l2_device_disconnect. +Note that if you do your own locking and want to use the control framework, +then you have to implement the control callbacks yourself so you can take +your own lock before calling into the control framework. Otherwise your lock +won't be held when the v4l2_ctrl_ops are called. You can't take your lock +there because a driver can also call e.g. v4l2_ctrl_s_ctrl with your lock +already held, which in turn will call the s_ctrl op, which will attempt to +take your lock again: deadlock! + video_device registration ------------------------- -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html