<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/test-drivers, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-02T11:57:18+00:00</updated>
<entry>
<title>media: vidtv: initialize local pointers upon transfer of memory ownership</title>
<updated>2026-01-02T11:57:18+00:00</updated>
<author>
<name>Jeongjun Park</name>
<email>aha310510@gmail.com</email>
</author>
<published>2025-09-05T05:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30f4d4e5224a9e44e9ceb3956489462319d804ce'/>
<id>urn:sha1:30f4d4e5224a9e44e9ceb3956489462319d804ce</id>
<content type='text'>
commit 98aabfe2d79f74613abc2b0b1cef08f97eaf5322 upstream.

vidtv_channel_si_init() creates a temporary list (program, service, event)
and ownership of the memory itself is transferred to the PAT/SDT/EIT
tables through vidtv_psi_pat_program_assign(),
vidtv_psi_sdt_service_assign(), vidtv_psi_eit_event_assign().

The problem here is that the local pointer where the memory ownership
transfer was completed is not initialized to NULL. This causes the
vidtv_psi_pmt_create_sec_for_each_pat_entry() function to fail, and
in the flow that jumps to free_eit, the memory that was freed by
vidtv_psi_*_table_destroy() can be accessed again by
vidtv_psi_*_event_destroy() due to the uninitialized local pointer, so it
is freed once again.

Therefore, to prevent use-after-free and double-free vulnerability,
local pointers must be initialized to NULL when transferring memory
ownership.

Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: syzbot+1d9c0edea5907af239e0@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1d9c0edea5907af239e0
Fixes: 3be8037960bc ("media: vidtv: add error checks")
Signed-off-by: Jeongjun Park &lt;aha310510@gmail.com&gt;
Reviewed-by: Daniel Almeida &lt;daniel.almeida@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: vivid: fix disappearing &lt;Vendor Command With ID&gt; messages</title>
<updated>2025-09-09T14:12:56+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil+cisco@kernel.org</email>
</author>
<published>2025-09-06T10:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bd8a6147645480d550242ff816b4c7ba160e5b7'/>
<id>urn:sha1:4bd8a6147645480d550242ff816b4c7ba160e5b7</id>
<content type='text'>
The vivid driver supports the &lt;Vendor Command With ID&gt; message,
but if the Vendor ID of the received message didn't match the Vendor ID
of the CEC Adapter, then it ignores it (good) and returns 0 (bad).

It should return -ENOMSG to indicate that other followers should be
asked to handle it. Return code 0 means that the driver handled it,
which is wrong in this case.

As a result, userspace followers never get the chance to process such a
message.

Refactor the code a bit to have the function return -ENOMSG at the end,
drop the default case, and ensure that the message handlers return 0.

That way 0 is only returned if the message is actually handled in the
vivid_received() function.

Fixes: 812765cd6954 ("media: vivid: add &lt;Vendor Command With ID&gt; support")
Cc: stable@vger.kernel.org
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: update Hans Verkuil's email address</title>
<updated>2025-09-09T13:58:44+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@kernel.org</email>
</author>
<published>2025-06-24T06:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce4c356d760f6fb22d69f0c5091542891ba6f394'/>
<id>urn:sha1:ce4c356d760f6fb22d69f0c5091542891ba6f394</id>
<content type='text'>
Replace hansverk@cisco.com by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil &lt;hverkuil@kernel.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vim2m: remove unused CLIP macro</title>
<updated>2025-08-29T09:04:01+00:00</updated>
<author>
<name>Yunseong Kim</name>
<email>ysk@kzalloc.com</email>
</author>
<published>2025-07-14T13:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=419f151de0beb5eb5755ded57766481bddb6ad26'/>
<id>urn:sha1:419f151de0beb5eb5755ded57766481bddb6ad26</id>
<content type='text'>
The CLIP macro, which was used to clamp color component values to the
[0, 255] range, is no longer used anywhere in the vim2m driver. Remove it
to clean up the code and avoid confusion.

The following issues were reported by checkpatch:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Yunseong Kim &lt;ysk@kzalloc.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vim2m: Remove compilation conditional to CONFIG_MEDIA_CONTROLLER</title>
<updated>2025-08-25T13:40:35+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2024-06-18T10:42:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55ad04a652789464c522c9d7d0a1cbf76bfb5273'/>
<id>urn:sha1:55ad04a652789464c522c9d7d0a1cbf76bfb5273</id>
<content type='text'>
MEDIA_CONTROLLER is selected for vim2m already since commit 016baa59bf9f
("media: Kconfig: Don't expose the Request API option"). Also remove the
related #ifdefs.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vimc: Don't explicitly set bus_info</title>
<updated>2025-08-25T13:40:31+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2023-11-29T14:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0125d9e1b3a2c0fd5a5adeb56ed5a415f4bc9fa2'/>
<id>urn:sha1:0125d9e1b3a2c0fd5a5adeb56ed5a415f4bc9fa2</id>
<content type='text'>
The platform device name is already set by V4L2 and MC frameworks for
media device bus_info and V4L2 querycap bus_info fields. Don't do it in
the driver.

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: test-drivers: Rename second ioctl handlers argument to 'void *priv'</title>
<updated>2025-08-13T06:33:58+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2025-08-10T01:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb74fac758d46edddad56c66ae593a41b1553a2b'/>
<id>urn:sha1:bb74fac758d46edddad56c66ae593a41b1553a2b</id>
<content type='text'>
The second argument to the ioctl handlers is not a file handle any more.
Rename it from 'void *fh' to 'void *priv', to avoid misconceptions. This
is particularly important in test drivers as they are meant to be used
as reference implementations.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Reset file-&gt;private_data to NULL in v4l2_fh_del()</title>
<updated>2025-08-13T06:33:44+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2025-08-10T01:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=277966749f46bc6292c4052b4e66a554f193a78a'/>
<id>urn:sha1:277966749f46bc6292c4052b4e66a554f193a78a</id>
<content type='text'>
Multiple drivers that use v4l2_fh and call v4l2_fh_del() manually reset
the file-&gt;private_data pointer to NULL in their video device .release()
file operation handler. Move the code to the v4l2_fh_del() function to
avoid direct access to file-&gt;private_data in drivers. This requires
adding a file pointer argument to the function.

Changes to drivers have been generated with the following coccinelle
semantic patch:

@@
expression fh;
identifier filp;
identifier release;
type ret;
@@
ret release(..., struct file *filp, ...)
{
	&lt;...
-	filp-&gt;private_data = NULL;
	...
-	v4l2_fh_del(fh);
+	v4l2_fh_del(fh, filp);
	...&gt;
}

@@
expression fh;
identifier filp;
identifier release;
type ret;
@@
ret release(..., struct file *filp, ...)
{
	&lt;...
-	v4l2_fh_del(fh);
+	v4l2_fh_del(fh, filp);
	...
-	filp-&gt;private_data = NULL;
	...&gt;
}

@@
expression fh;
identifier filp;
identifier release;
type ret;
@@
ret release(..., struct file *filp, ...)
{
	&lt;...
-	v4l2_fh_del(fh);
+	v4l2_fh_del(fh, filp);
	...&gt;
}

Manual changes have been applied to Documentation/ to update the usage
patterns, to drivers/media/v4l2-core/v4l2-fh.c to update the
v4l2_fh_del() prototype and reset file-&gt;private_data, and to
include/media/v4l2-fh.h to update the v4l2_fh_del() function prototype
and its documentation.

Additionally, white space issues have been fixed manually in
drivers/usb/gadget/function/uvc_v4l2.c

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Set file-&gt;private_data in v4l2_fh_add()</title>
<updated>2025-08-13T06:33:39+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2025-08-10T01:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=47f4b1acb4d505b1e7e81d8e0ebce774422b8c2e'/>
<id>urn:sha1:47f4b1acb4d505b1e7e81d8e0ebce774422b8c2e</id>
<content type='text'>
All the drivers that use v4l2_fh and call v4l2_fh_add() manually store a
pointer to the v4l2_fh instance in file-&gt;private_data in their video
device .open() file operation handler. Move the code to the
v4l2_fh_add() function to avoid direct access to file-&gt;private_data in
drivers. This requires adding a file pointer argument to the function.

Changes to drivers have been generated with the following coccinelle
semantic patch:

@@
expression fh;
identifier filp;
identifier open;
type ret;
@@
ret open(..., struct file *filp, ...)
{
	&lt;...
-	filp-&gt;private_data = fh;
	...
-	v4l2_fh_add(fh);
+	v4l2_fh_add(fh, filp);
	...&gt;
}

@@
expression fh;
identifier filp;
identifier open;
type ret;
@@
ret open(..., struct file *filp, ...)
{
	&lt;...
-	v4l2_fh_add(fh);
+	v4l2_fh_add(fh, filp);
	...
-	filp-&gt;private_data = fh;
	...&gt;
}

Manual changes have been applied to Documentation/ to update the usage
patterns, to drivers/media/v4l2-core/v4l2-fh.c to update the
v4l2_fh_add() prototype set file-&gt;private_data, and to
include/media/v4l2-fh.h to update the v4l2_fh_add() function prototype
and its documentation.

Additionally, white space issues have been fixed manually in
drivers/media/platform/nvidia/tegra-vde/v4l2.c,
drivers/media/platform/rockchip/rkvdec/rkvdec.c,
drivers/media/v4l2-core/v4l2-fh.c and
drivers/staging/most/video/video.c.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: visl: Drop visl_v4l2fh_to_ctx() function</title>
<updated>2025-08-13T06:33:31+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2025-08-10T01:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b847fa1bc9509150433aa16a1a1d3bac8a2bd38'/>
<id>urn:sha1:1b847fa1bc9509150433aa16a1a1d3bac8a2bd38</id>
<content type='text'>
The visl_v4l2fh_to_ctx() function is unused. Drop it.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
</feed>
