Skip to content
Commit 25f57655 authored by Vandana BN's avatar Vandana BN Committed by Sasha Levin
Browse files

media: v4l2-core: correctly validate video and metadata ioctls

[ Upstream commit 96f49c1a

 ]

If the type is VFL_TYPE_GRABBER, then also check device_caps
to see if the video device supports video and/or metadata and
disable unneeded ioctls.

Without this change, format ioctls for both video and metadata devices
could be called on both device nodes. This is true for other ioctls as
well, even if the device supports only video or metadata.

Metadata devices act similar to VBI devices w.r.t. which ioctls should
be enabled. This makes sense since VBI *is* metadata.

Signed-off-by: default avatarVandana BN <bnvandana@gmail.com>
Co-developed-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Stable-dep-of: d0b07f71

 ("media: ttpci: fix two memleaks in budget_av_attach")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 291cda0b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment