summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core/v4l2-dev.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-27 15:04:23 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-15 02:45:23 +0400
commitcd634f1bfc182e564f33809fdca33027bb99fceb (patch)
treee81c3b626866a64b8152576cb500ee2fc2fe40a0 /drivers/media/v4l2-core/v4l2-dev.c
parentdfc2e12df02d49a1567bc90989ceef870cf5b147 (diff)
downloadlinux-cd634f1bfc182e564f33809fdca33027bb99fceb.tar.xz
[media] v4l2: put VIDIOC_DBG_G_CHIP_NAME under ADV_DEBUG
Only enable this ioctl if the VIDEO_ADV_DEBUG config option is set. This prevents abuse from both userspace and kernelspace (some bridge drivers abuse DBG_G_CHIP_IDENT, lets prevent that from happening again with this ioctl). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-dev.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 670b9ca8ecbe..1c3b43cf773d 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -591,8 +591,8 @@ static void determine_valid_ioctls(struct video_device *vdev)
SET_VALID_IOCTL(ops, VIDIOC_G_FREQUENCY, vidioc_g_frequency);
SET_VALID_IOCTL(ops, VIDIOC_S_FREQUENCY, vidioc_s_frequency);
SET_VALID_IOCTL(ops, VIDIOC_LOG_STATUS, vidioc_log_status);
- set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_NAME), valid_ioctls);
#ifdef CONFIG_VIDEO_ADV_DEBUG
+ set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_NAME), valid_ioctls);
set_bit(_IOC_NR(VIDIOC_DBG_G_REGISTER), valid_ioctls);
set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls);
#endif