linux-stable/drivers/media
Laurent Pinchart 47cc3cae30 media: uvcvideo: Don't expose unsupported formats to userspace
[ Upstream commit 81f3affa19 ]

When the uvcvideo driver encounters a format descriptor with an unknown
format GUID, it creates a corresponding struct uvc_format instance with
the fcc field set to 0. Since commit 50459f103e ("media: uvcvideo:
Remove format descriptions"), the driver relies on the V4L2 core to
provide the format description string, which the V4L2 core can't do
without a valid 4CC. This triggers a WARN_ON.

As a format with a zero 4CC can't be selected, it is unusable for
applications. Ignore the format completely without creating a uvc_format
instance, which fixes the warning.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217252
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2180107

Fixes: 50459f103e ("media: uvcvideo: Remove format descriptions")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09 10:34:18 +02:00
..
cec media fixes for v6.1-rc2 2022-10-22 15:30:15 -07:00
common media: videobuf2-core: take mmap_lock in vb2_get_unmapped_area() 2022-12-07 11:25:40 -08:00
dvb-core media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221 2023-06-09 10:34:13 +02:00
dvb-frontends media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table 2023-06-09 10:34:12 +02:00
firewire
i2c media: hi846: Fix memleak in hi846_init_controls() 2023-05-11 23:03:15 +09:00
mc media: mc: Get media_device directly from pad 2023-03-10 09:33:42 +01:00
mmc
pci media: netup_unidvb: fix irq init by register it at the end of probe 2023-06-09 10:34:12 +02:00
platform media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats 2023-06-09 10:34:17 +02:00
radio media: radio-shark: Add endpoint checks 2023-05-30 14:03:20 +01:00
rc media: rc: gpio-ir-recv: Fix support for wake-up 2023-05-11 23:03:15 +09:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: vimc: Fix wrong function called when vimc_init() fails 2022-12-31 13:32:16 +01:00
tuners media fixes for v6.1-rc2 2022-10-22 15:30:15 -07:00
usb media: uvcvideo: Don't expose unsupported formats to userspace 2023-06-09 10:34:18 +02:00
v4l2-core media: v4l: async: Return async sub-devices to subnotifier list 2023-05-11 23:03:15 +09:00
Kconfig media: remove reference to CONFIG_EMBEDDED in MEDIA_SUPPORT_FILTER 2022-09-08 18:19:29 +02:00
Makefile