Skip to content

Commit

Permalink
[media] v4l2-dev.h: add comment not to use V4L2_FL_LOCK_ALL_FOPS in n…
Browse files Browse the repository at this point in the history
…ew drivers

This flag is for legacy drivers only and will go away in the future.

A note regarding commit 5126f25
(v4l2-dev: add flag to have the core lock all file operations):

That commit message suggests that by not taking the core lock for fops
other than unlocked_ioctl all problems relating to AB-BA locking and
mm->mmap_sem are solved. This is not the case.

More work needs to be done by moving the core lock further down into
video_ioctl2. It should only be taken after the copy_from/to_user calls
are done.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 74f22c4 commit 47bd4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/media/v4l2-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct v4l2_ctrl_handler;
/* Use the prio field of v4l2_fh for core priority checking */
#define V4L2_FL_USE_FH_PRIO (2)
/* If ioctl core locking is in use, then apply that also to all
file operations. */
file operations. Don't use this flag in new drivers! */
#define V4L2_FL_LOCK_ALL_FOPS (3)

/* Priority helper functions */
Expand Down

0 comments on commit 47bd4bc

Please sign in to comment.