<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/test-drivers, branch v7.2-rc2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-05-20T14:00:40+00:00</updated>
<entry>
<title>media: vivid: check for vb2_is_busy() when toggling caps</title>
<updated>2026-05-20T14:00:40+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil+cisco@kernel.org</email>
</author>
<published>2026-05-20T07:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c2d1a2130c93f6d758af58590b86b2254c7a1dec'/>
<id>urn:sha1:c2d1a2130c93f6d758af58590b86b2254c7a1dec</id>
<content type='text'>
The vivid_update_format_cap/out() functions must only be called if the
capture/output queue are not busy. But for the controls that select
the CROP/COMPOSE/SCALE capability that is not checked.

Only when streaming starts will they be set to 'grabbed' and it is
impossible to change the control, but between REQBUFS and STREAMON you
are still allowed to set these controls. Since vivid_update_format_cap/out
will change the format, this can cause unexpected results.

Besides adding these checks, also add a WARN_ON in
vivid_update_format_cap/out() if the queue is busy.

I'm 90% certain that this is the cause of this syzbot bug:

https://syzkaller.appspot.com/bug?extid=dac8f5eaa46837e97b89

But since we never have reproducers, it is hard to be certain. In any case,
these checks are needed regardless.

Reviewed-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Fixes: 73c3f48230cd ("[media] vivid: add the control handling code")
Cc: stable@vger.kernel.org
Reported-by: syzbot+dac8f5eaa46837e97b89@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=dac8f5eaa46837e97b89
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vivid: add vivid_update_reduced_fps()</title>
<updated>2026-05-20T14:00:39+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil+cisco@kernel.org</email>
</author>
<published>2026-05-20T07:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d793a29efb4260f90913f5287939bf95573b073'/>
<id>urn:sha1:1d793a29efb4260f90913f5287939bf95573b073</id>
<content type='text'>
Don't call vivid_update_format_cap() when switching to/from reduced fps
for HDMI inputs: that will also reset the format, which is overkill for
this.

Make a new vivid_update_reduced_fps() function that just updates the
dev-&gt;timeperframe_vid_cap.

Reviewed-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Fixes: c79aa6aeadb0 ("[media] vivid-capture: add control for reduced frame rate")
Cc: stable@vger.kernel.org
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Use named initializers for arrays of i2c_device_data</title>
<updated>2026-05-20T07:03:40+00:00</updated>
<author>
<name>Uwe Kleine-König (The Capable Hub)</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2026-05-15T16:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2958d579ffb13571c9788d741e6115dc917b05a4'/>
<id>urn:sha1:2958d579ffb13571c9788d741e6115dc917b05a4</id>
<content type='text'>
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
i2c_device_id that replaces .driver_data by an anonymous union.

While touching all these arrays, unify usage of whitespace and commas.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: visl: check if ctx-&gt;tpg_str_buf allocation failed</title>
<updated>2026-05-12T07:39:03+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil+cisco@kernel.org</email>
</author>
<published>2026-05-12T06:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=813dacdda8f2e05b1309a4942e91531333b296ed'/>
<id>urn:sha1:813dacdda8f2e05b1309a4942e91531333b296ed</id>
<content type='text'>
The result of ctx-&gt;tpg_str_buf = kzalloc(TPG_STR_BUF_SZ, GFP_KERNEL); was
never checked. Add this.

Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vivid: fix cleanup bugs in vivid_init()</title>
<updated>2026-05-05T14:57:03+00:00</updated>
<author>
<name>Guangshuo Li</name>
<email>lgs201920130244@gmail.com</email>
</author>
<published>2026-04-15T16:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a07c179a92e949172ca52f6d4a13202ea88cd4b7'/>
<id>urn:sha1:a07c179a92e949172ca52f6d4a13202ea88cd4b7</id>
<content type='text'>
When platform_device_register() fails in vivid_init(), the embedded
struct device in vivid_pdev has already been initialized by
device_initialize(), but the failure path jumps to free_output_strings
without dropping the device reference for the current platform device:

  vivid_init()
    -&gt; platform_device_register(&amp;vivid_pdev)
       -&gt; device_initialize(&amp;vivid_pdev.dev)
       -&gt; setup_pdev_dma_masks(&amp;vivid_pdev)
       -&gt; platform_device_add(&amp;vivid_pdev)

This leads to a reference leak when platform_device_register() fails.
Fix this by calling platform_device_put() before jumping to the common
cleanup path.

Also, the unreg_driver label incorrectly calls
platform_driver_register() instead of platform_driver_unregister(),
which breaks cleanup when workqueue creation fails after successful
driver registration. Fix that as well.

The reference leak was identified by a static analysis tool I developed
and confirmed by manual review. The incorrect cleanup call was found
during code inspection.

Fixes: f46d740fb0258 ("[media] vivid: turn this into a platform_device")
Fixes: d7c969f37515d ("media: vivid: Add 'Is Connected To' menu controls")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li &lt;lgs201920130244@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vimc: fix reference leak on failed device registration</title>
<updated>2026-05-05T14:57:02+00:00</updated>
<author>
<name>Guangshuo Li</name>
<email>lgs201920130244@gmail.com</email>
</author>
<published>2026-04-15T15:45:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33e2b833c66b890a0d71c4fa82d4c97143f7f75f'/>
<id>urn:sha1:33e2b833c66b890a0d71c4fa82d4c97143f7f75f</id>
<content type='text'>
When platform_device_register() fails in vimc_init(), the embedded
struct device in vimc_pdev has already been initialized by
device_initialize(), but the failure path returns the error without
dropping the device reference for the current platform device:

  vimc_init()
    -&gt; platform_device_register(&amp;vimc_pdev)
       -&gt; device_initialize(&amp;vimc_pdev.dev)
       -&gt; setup_pdev_dma_masks(&amp;vimc_pdev)
       -&gt; platform_device_add(&amp;vimc_pdev)

This leads to a reference leak when platform_device_register() fails.
Fix this by calling platform_device_put() before returning the error.

The issue was identified by a static analysis tool I developed and
confirmed by manual review.

Fixes: 4babf057c143f ("media: vimc: allocate vimc_device dynamically")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li &lt;lgs201920130244@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vidtv: fix reference leak on failed device registration</title>
<updated>2026-05-05T14:57:02+00:00</updated>
<author>
<name>Guangshuo Li</name>
<email>lgs201920130244@gmail.com</email>
</author>
<published>2026-04-15T15:28:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9aa21e1549db8882ff77b691e7714153df21dff0'/>
<id>urn:sha1:9aa21e1549db8882ff77b691e7714153df21dff0</id>
<content type='text'>
When platform_device_register() fails in vidtv_bridge_init(), the
embedded struct device in vidtv_bridge_dev has already been initialized
by device_initialize(), but the failure path returns the error without
dropping the device reference for the current platform device:

  vidtv_bridge_init()
    -&gt; platform_device_register(&amp;vidtv_bridge_dev)
       -&gt; device_initialize(&amp;vidtv_bridge_dev.dev)
       -&gt; setup_pdev_dma_masks(&amp;vidtv_bridge_dev)
       -&gt; platform_device_add(&amp;vidtv_bridge_dev)

This leads to a reference leak when platform_device_register() fails.
Fix this by calling platform_device_put() before returning the error.

The issue was identified by a static analysis tool I developed and
confirmed by manual review.

Fixes: f90cf6079bf67 ("media: vidtv: add a bridge driver")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li &lt;lgs201920130244@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vidtv: fix NULL pointer dereference in vidtv_mux_push_si</title>
<updated>2026-05-05T14:57:01+00:00</updated>
<author>
<name>Ruslan Valiyev</name>
<email>linuxoid@gmail.com</email>
</author>
<published>2026-03-17T17:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d8bf3d8f91073f4db347ed3aa6302b56107499c'/>
<id>urn:sha1:7d8bf3d8f91073f4db347ed3aa6302b56107499c</id>
<content type='text'>
syzbot reported a general protection fault in
vidtv_psi_ts_psi_write_into [1].

vidtv_mux_get_pid_ctx() can return NULL, but vidtv_mux_push_si() does
not check for this before dereferencing the returned pointer to access
the continuity counter. This leads to a general protection fault when
accessing a near-NULL address.

The root cause is that vidtv_mux_pid_ctx_init() does not check the
return value of vidtv_mux_create_pid_ctx_once() for PMT section PIDs.
If the allocation fails, the PID context is never created, but init
returns success. The subsequent vidtv_mux_push_si() call then gets
NULL from vidtv_mux_get_pid_ctx() and crashes.

Fix both the root cause (add error check in vidtv_mux_pid_ctx_init
for PMT PIDs) and add defensive NULL checks in vidtv_mux_push_si for
all vidtv_mux_get_pid_ctx() calls.

[1]
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
Workqueue: events vidtv_mux_tick
RIP: 0010:vidtv_psi_ts_psi_write_into+0x54a/0xbc0 drivers/media/test-drivers/vidtv/vidtv_psi.c:197
Call Trace:
 &lt;TASK&gt;
 vidtv_psi_table_header_write_into drivers/media/test-drivers/vidtv/vidtv_psi.c:799 [inline]
 vidtv_psi_pmt_write_into+0x3b2/0xa70 drivers/media/test-drivers/vidtv/vidtv_psi.c:1231
 vidtv_mux_push_si+0x932/0xe80 drivers/media/test-drivers/vidtv/vidtv_mux.c:196
 vidtv_mux_tick+0xe9b/0x1480 drivers/media/test-drivers/vidtv/vidtv_mux.c:408

Fixes: f90cf6079bf67 ("media: vidtv: add a bridge driver")
Cc: stable@vger.kernel.org
Reported-by: syzbot+814c351d094f4f1a1b86@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=814c351d094f4f1a1b86
Signed-off-by: Ruslan Valiyev &lt;linuxoid@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vidtv: Use crc32_be() instead of open coding</title>
<updated>2026-03-25T17:27:25+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-03-16T21:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96c6d8e138c02e4bd8467da43192ac52170f7c4a'/>
<id>urn:sha1:96c6d8e138c02e4bd8467da43192ac52170f7c4a</id>
<content type='text'>
dvb_crc32() does exactly the same computation as the crc32_be() library
function.  Just call crc32_be() instead.

Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vimc: streamer: Apply sensor frame rate in streamer thread</title>
<updated>2026-03-17T09:50:19+00:00</updated>
<author>
<name>Faizel K B</name>
<email>faizel.kb@gmail.com</email>
</author>
<published>2026-03-12T23:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24ae633ab3b8b0f632b94774a62a5f7e7b754299'/>
<id>urn:sha1:24ae633ab3b8b0f632b94774a62a5f7e7b754299</id>
<content type='text'>
Use the sensor's pre-calculated jiffies value to add appropriate
delay between frames according to the configured timing value.
The actual frame rate  will vary depending on processing delays in
other media pipeline components.

Tested using yavta frame rate display with QCIF resolution:
yavta &lt;video-node&gt; --capture=&lt;no_of_frames&gt;

Signed-off-by: Faizel K B &lt;faizel.kb@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
</feed>
