<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/rc, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-11T09:17:33+00:00</updated>
<entry>
<title>media: rc: st_rc: Fix reset control resource leak</title>
<updated>2025-11-11T09:17:33+00:00</updated>
<author>
<name>Haotian Zhang</name>
<email>vulab@iscas.ac.cn</email>
</author>
<published>2025-10-31T06:03:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1240abf4b71f632f0117b056e22488e4d9808938'/>
<id>urn:sha1:1240abf4b71f632f0117b056e22488e4d9808938</id>
<content type='text'>
The driver calls reset_control_get_optional_exclusive() but never calls
reset_control_put() in error paths or in the remove function. This causes
a resource leak when probe fails after successfully acquiring the reset
control, or when the driver is unloaded.

Switch to devm_reset_control_get_optional_exclusive() to automatically
manage the reset control resource.

Fixes: a4b80242d046 ("media: st-rc: explicitly request exclusive reset control")
Cc: stable@vger.kernel.org
Signed-off-by: Haotian Zhang &lt;vulab@iscas.ac.cn&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ir-hix5hd2: Drop unused module alias</title>
<updated>2025-11-11T09:17:33+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2025-10-17T06:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=674961a9c87903bf2222a2c26809e013903a8960'/>
<id>urn:sha1:674961a9c87903bf2222a2c26809e013903a8960</id>
<content type='text'>
The driver has never supported anything but OF probing so drop the
unused platform module alias.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'media/v6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media</title>
<updated>2025-10-02T20:13:26+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-10-02T20:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f79e772258df311c2cb21594ca0996318e720d28'/>
<id>urn:sha1:f79e772258df311c2cb21594ca0996318e720d28</id>
<content type='text'>
Pull media updates from Mauro Carvalho Chehab:

 - Added a new V4L2 clock helper

 - New camera sensor drivers

 - iris: Enable H.264/H.265 encoder support and fixes in iris driver
   common code

 - camss: add support for new SoC flavors

 - venus: add new SoC support

 - tc358743: support more infoframe types

 - Various fixes, driver improvements and cleanups

* tag 'media/v6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (439 commits)
  media: venus: pm_helpers: add fallback for the opp-table
  media: qcom: camss: vfe: Fix BPL alignment for QCM2290
  media: tuner: xc5000: Fix use-after-free in xc5000_release
  media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe
  media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove
  media: vsp1: Export missing vsp1_isp_free_buffer symbol
  media: renesas: vsp1: Convert to SYSTEM_SLEEP/RUNTIME_PM_OPS()
  media: renesas: ceu: Convert to RUNTIME_PM_OPS()
  media: renesas: fdp1: Convert to RUNTIME_PM_OPS()
  media: renesas: rcar-vin: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  media: renesas: rcar_drif: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  media: uvcvideo: Mark invalid entities with id UVC_INVALID_ENTITY_ID
  media: uvcvideo: Support UVC_CROSXU_CONTROL_IQ_PROFILE
  media: uvcvideo: Run uvc_ctrl_init_ctrl for all controls
  media: uvcvideo: Shorten the transfer size non compliance message
  media: uvcvideo: Do not re-reference dev-&gt;udev
  media: uvcvideo: Use intf instead of udev for printks
  media: uvcvideo: Move video_device under video_queue
  media: uvcvideo: Drop stream-&gt;mutex
  media: uvcvideo: Move MSXU_CONTROL_METADATA definition to header
  ...
</content>
</entry>
<entry>
<title>media: redrat3: use int type to store negative error codes</title>
<updated>2025-09-11T06:46:10+00:00</updated>
<author>
<name>Qianfeng Rong</name>
<email>rongqianfeng@vivo.com</email>
</author>
<published>2025-08-27T12:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecba852dc9f4993f4f894ea1f352564560e19a3e'/>
<id>urn:sha1:ecba852dc9f4993f4f894ea1f352564560e19a3e</id>
<content type='text'>
Change "ret" from u8 to int type in redrat3_enable_detector() to store
negative error codes or zero returned by redrat3_send_cmd() and
usb_submit_urb() - this better aligns with the coding standards and
maintains code consistency.

No effect on runtime.

Signed-off-by: Qianfeng Rong &lt;rongqianfeng@vivo.com&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: rc: fix races with imon_disconnect()</title>
<updated>2025-09-11T06:46:10+00:00</updated>
<author>
<name>Larshin Sergey</name>
<email>Sergey.Larshin@kaspersky.com</email>
</author>
<published>2025-07-29T10:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa0f61cc1d828178aa921475a9b786e7fbb65ccb'/>
<id>urn:sha1:fa0f61cc1d828178aa921475a9b786e7fbb65ccb</id>
<content type='text'>
Syzbot reports a KASAN issue as below:
BUG: KASAN: use-after-free in __create_pipe include/linux/usb.h:1945 [inline]
BUG: KASAN: use-after-free in send_packet+0xa2d/0xbc0 drivers/media/rc/imon.c:627
Read of size 4 at addr ffff8880256fb000 by task syz-executor314/4465

CPU: 2 PID: 4465 Comm: syz-executor314 Not tainted 6.0.0-rc1-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
 &lt;TASK&gt;
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:317 [inline]
print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433
kasan_report+0xb1/0x1e0 mm/kasan/report.c:495
__create_pipe include/linux/usb.h:1945 [inline]
send_packet+0xa2d/0xbc0 drivers/media/rc/imon.c:627
vfd_write+0x2d9/0x550 drivers/media/rc/imon.c:991
vfs_write+0x2d7/0xdd0 fs/read_write.c:576
ksys_write+0x127/0x250 fs/read_write.c:631
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd

The iMON driver improperly releases the usb_device reference in
imon_disconnect without coordinating with active users of the
device.

Specifically, the fields usbdev_intf0 and usbdev_intf1 are not
protected by the users counter (ictx-&gt;users). During probe,
imon_init_intf0 or imon_init_intf1 increments the usb_device
reference count depending on the interface. However, during
disconnect, usb_put_dev is called unconditionally, regardless of
actual usage.

As a result, if vfd_write or other operations are still in
progress after disconnect, this can lead to a use-after-free of
the usb_device pointer.

Thread 1 vfd_write                      Thread 2 imon_disconnect
                                        ...
                                        if
                                          usb_put_dev(ictx-&gt;usbdev_intf0)
                                        else
                                          usb_put_dev(ictx-&gt;usbdev_intf1)
...
while
  send_packet
    if
      pipe = usb_sndintpipe(
        ictx-&gt;usbdev_intf0) UAF
    else
      pipe = usb_sndctrlpipe(
        ictx-&gt;usbdev_intf0, 0) UAF

Guard access to usbdev_intf0 and usbdev_intf1 after disconnect by
checking ictx-&gt;disconnected in all writer paths. Add early return
with -ENODEV in send_packet(), vfd_write(), lcd_write() and
display_open() if the device is no longer present.

Set and read ictx-&gt;disconnected under ictx-&gt;lock to ensure memory
synchronization. Acquire the lock in imon_disconnect() before setting
the flag to synchronize with any ongoing operations.

Ensure writers exit early and safely after disconnect before the USB
core proceeds with cleanup.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Reported-by: syzbot+f1a69784f6efe748c3bf@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f1a69784f6efe748c3bf
Fixes: 21677cfc562a ("V4L/DVB: ir-core: add imon driver")
Cc: stable@vger.kernel.org

Signed-off-by: Larshin Sergey &lt;Sergey.Larshin@kaspersky.com&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: pwm-ir-tx: Avoid direct access to hrtimer clockbase</title>
<updated>2025-09-09T10:27:18+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-08-21T13:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=44d7fb8acdf833a97669afeeed40cf27eb1dfc24'/>
<id>urn:sha1:44d7fb8acdf833a97669afeeed40cf27eb1dfc24</id>
<content type='text'>
The field timer-&gt;base-&gt;get_time is a private implementation detail and
should not be accessed outside of the hrtimer core.

Switch to an equivalent higher-level helper.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Sean Young &lt;sean@mess.org&gt;
Link: https://lore.kernel.org/all/20250821-hrtimer-cleanup-get_time-v2-6-3ae822e5bfbd@linutronix.de

</content>
</entry>
<entry>
<title>media: Remove redundant pm_runtime_mark_last_busy() calls</title>
<updated>2025-08-18T07:55:08+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2025-07-09T19:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6f6fbd9a0c5a75eee0618c1499cf73cc770b3f52'/>
<id>urn:sha1:6f6fbd9a0c5a75eee0618c1499cf73cc770b3f52</id>
<content type='text'>
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt; (tegra-vde/h264.c)
Acked-by: Tommaso Merciai &lt;tommaso.merciai.xr@bp.renesas.com&gt; (alvium-csi2.c)
Reviewed-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt; (iris_hfi_queue.c)
Reviewed-by: Sean Young &lt;sean@mess.org&gt;
Acked-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt; (imx219.c)
Acked-by: Benjamin Mugnier &lt;benjamin.mugnier@foss.st.com&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: imon: Remove unused defines</title>
<updated>2025-08-15T07:47:13+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2025-07-16T14:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a75b8d198c55e9eb5feb6f6e155496305caba2dc'/>
<id>urn:sha1:a75b8d198c55e9eb5feb6f6e155496305caba2dc</id>
<content type='text'>
These defines were used for devices now supported by the imon_raw
driver.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: imon: grab lock earlier in imon_ir_change_protocol()</title>
<updated>2025-08-15T07:47:13+00:00</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2025-07-17T16:04:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7019553ab850ce1d3f0e512e16d14ab153f91c04'/>
<id>urn:sha1:7019553ab850ce1d3f0e512e16d14ab153f91c04</id>
<content type='text'>
Move mutex_trylock() in imon_ir_change_protocol() to the beginning,
for memcpy() which modifies ictx-&gt;usb_tx_buf should be protected by
ictx-&gt;lock.

Also, verify at the beginning of send_packet() that ictx-&gt;lock is held
in case send_packet() is by error called from imon_ir_change_protocol()
when mutex_trylock() failed due to concurrent requests.

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: imon: make send_packet() more robust</title>
<updated>2025-08-15T07:47:13+00:00</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2025-07-17T14:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eecd203ada43a4693ce6fdd3a58ae10c7819252c'/>
<id>urn:sha1:eecd203ada43a4693ce6fdd3a58ae10c7819252c</id>
<content type='text'>
syzbot is reporting that imon has three problems which result in
hung tasks due to forever holding device lock [1].

First problem is that when usb_rx_callback_intf0() once got -EPROTO error
after ictx-&gt;dev_present_intf0 became true, usb_rx_callback_intf0()
resubmits urb after printk(), and resubmitted urb causes
usb_rx_callback_intf0() to again get -EPROTO error. This results in
printk() flooding (RCU stalls).

Alan Stern commented [2] that

  In theory it's okay to resubmit _if_ the driver has a robust
  error-recovery scheme (such as giving up after some fixed limit on the
  number of errors or after some fixed time has elapsed, perhaps with a
  time delay to prevent a flood of errors).  Most drivers don't bother to
  do this; they simply give up right away.  This makes them more
  vulnerable to short-term noise interference during USB transfers, but in
  reality such interference is quite rare.  There's nothing really wrong
  with giving up right away.

but imon has a poor error-recovery scheme which just retries forever;
this behavior should be fixed.

Since I'm not sure whether it is safe for imon users to give up upon any
error code, this patch takes care of only union of error codes chosen from
modules in drivers/media/rc/ directory which handle -EPROTO error (i.e.
ir_toy, mceusb and igorplugusb).

Second problem is that when usb_rx_callback_intf0() once got -EPROTO error
before ictx-&gt;dev_present_intf0 becomes true, usb_rx_callback_intf0() always
resubmits urb due to commit 8791d63af0cf ("[media] imon: don't wedge
hardware after early callbacks"). Move the ictx-&gt;dev_present_intf0 test
introduced by commit 6f6b90c9231a ("[media] imon: don't parse scancodes
until intf configured") to immediately before imon_incoming_packet(), or
the first problem explained above happens without printk() flooding (i.e.
hung task).

Third problem is that when usb_rx_callback_intf0() is not called for some
reason (e.g. flaky hardware; the reproducer for this problem sometimes
prevents usb_rx_callback_intf0() from being called),
wait_for_completion_interruptible() in send_packet() never returns (i.e.
hung task). As a workaround for such situation, change send_packet() to
wait for completion with timeout of 10 seconds.

Link: https://syzkaller.appspot.com/bug?extid=592e2ab8775dbe0bf09a [1]
Link: https://lkml.kernel.org/r/d6da6709-d799-4be3-a695-850bddd6eb24@rowland.harvard.edu [2]
Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
</feed>
