Nikita Zhandarovich
36cef585e2
media: vimc: skip .s_stream() for stopped entities
Syzbot reported [1] a warning prompted by a check in call_s_stream()
that checks whether .s_stream() operation is warranted for unstarted
or stopped subdevs.
Add a simple fix in vimc_streamer_pipeline_terminate() ensuring that
entities skip a call to .s_stream() unless they have been previously
properly started.
[1] Syzbot report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5933 at drivers/media/v4l2-core/v4l2-subdev.c:460 call_s_stream+0x2df/0x350 drivers/media/v4l2-core/v4l2-subdev.c:460
Modules linked in:
CPU: 0 UID: 0 PID: 5933 Comm: syz-executor330 Not tainted 6.13.0-rc2-syzkaller-00362-g2d8308bf5b67 #0
...
Call Trace:
<TASK>
vimc_streamer_pipeline_terminate+0x218/0x320 drivers/media/test-drivers/vimc/vimc-streamer.c:62
vimc_streamer_pipeline_init drivers/media/test-drivers/vimc/vimc-streamer.c:101 [inline]
vimc_streamer_s_stream+0x650/0x9a0 drivers/media/test-drivers/vimc/vimc-streamer.c:203
vimc_capture_start_streaming+0xa1/0x130 drivers/media/test-drivers/vimc/vimc-capture.c:256
vb2_start_streaming+0x15f/0x5a0 drivers/media/common/videobuf2/videobuf2-core.c:1789
vb2_core_streamon+0x2a7/0x450 drivers/media/common/videobuf2/videobuf2-core.c:2348
vb2_streamon drivers/media/common/videobuf2/videobuf2-v4l2.c:875 [inline]
vb2_ioctl_streamon+0xf4/0x170 drivers/media/common/videobuf2/videobuf2-v4l2.c:1118
__video_do_ioctl+0xaf0/0xf00 drivers/media/v4l2-core/v4l2-ioctl.c:3122
video_usercopy+0x4d2/0x1620 drivers/media/v4l2-core/v4l2-ioctl.c:3463
v4l2_ioctl+0x1ba/0x250 drivers/media/v4l2-core/v4l2-dev.c:366
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:906 [inline]
__se_sys_ioctl fs/ioctl.c:892 [inline]
__x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2b85c01b19
...
Reported-by: syzbot+5bcd7c809d365e14c4df@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5bcd7c809d365e14c4df
Fixes: adc589d2a2 ("media: vimc: Add vimc-streamer for stream control")
Cc: stable@vger.kernel.org
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-03-05 17:40:18 +01:00
..
2025-01-26 17:50:53 -08:00
2025-02-01 09:49:20 -08:00
2025-01-27 16:51:51 -08:00
2025-01-31 11:07:56 -08:00
2025-01-24 08:03:52 -08:00
2025-01-31 15:13:25 -08:00
2025-01-31 11:49:30 -08:00
2025-01-29 15:23:49 -05:00
2025-01-28 12:25:12 -08:00
2025-01-28 13:48:37 +01:00
2025-01-10 15:43:16 +01:00
2025-01-28 13:48:37 +01:00
2025-01-26 18:36:23 -08:00
2025-01-10 00:54:21 +00:00
2025-01-29 10:56:11 +01:00
2025-01-30 15:10:34 -08:00
2025-01-28 12:25:12 -08:00
2025-01-29 11:23:22 -08:00
2025-01-13 20:48:34 +01:00
2025-01-29 14:29:57 -08:00
2025-01-21 09:38:52 -08:00
2025-01-12 13:44:27 +01:00
2025-01-28 12:25:12 -08:00
2025-01-31 09:17:02 -08:00
2025-01-09 10:56:57 +01:00
2025-01-30 10:19:30 -08:00
2025-01-31 15:45:41 -08:00
2025-01-25 16:03:40 -08:00
2025-01-28 13:48:37 +01:00
2025-01-28 12:25:12 -08:00
2025-01-28 09:01:36 -08:00
2025-01-30 17:43:36 -08:00
2025-01-24 15:48:01 -08:00
2025-01-22 11:16:14 -08:00
2025-01-16 13:46:08 +01:00
2025-01-26 17:50:53 -08:00
2025-01-24 07:18:39 -08:00
2025-01-16 14:01:40 +01:00
2025-01-25 09:22:55 -08:00
2025-01-25 18:15:32 +08:00
2025-01-28 12:25:12 -08:00
2025-01-26 18:36:23 -08:00
2025-01-18 16:20:55 -06:00
2025-01-31 11:49:30 -08:00
2025-03-05 17:40:18 +01:00
2025-01-15 19:07:39 +01:00
2025-01-27 16:51:51 -08:00
2025-01-10 15:20:30 -05:00
2025-01-22 09:16:02 -08:00
2025-01-28 13:48:37 +01:00
2025-01-22 10:39:17 -08:00
2025-01-31 11:49:30 -08:00
2025-01-10 10:15:04 +01:00
2025-01-30 12:24:20 -08:00
2025-01-18 17:10:05 -08:00
2025-01-18 14:38:49 -06:00
2025-01-31 07:20:08 -07:00
2025-01-10 16:16:48 +01:00
2025-01-28 12:25:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-27 12:55:12 -06:00
2025-01-28 13:48:37 +01:00
2025-01-29 14:32:38 -08:00
2025-01-24 07:38:50 -08:00
2025-01-27 16:29:16 -08:00
2025-01-21 10:45:24 +01:00
2025-01-27 15:37:16 -08:00
2025-01-10 16:12:33 +01:00
2025-01-30 12:24:20 -08:00
2025-01-28 12:25:12 -08:00
2025-01-08 10:59:44 +01:00
2025-01-29 11:56:55 -08:00
2025-01-15 10:04:27 -07:00
2025-01-24 14:56:59 -08:00
2025-01-30 17:50:02 -08:00
2025-01-30 10:48:17 -08:00
2025-01-31 11:49:30 -08:00
2025-01-28 12:25:12 -08:00
2025-01-25 15:59:46 -08:00
2025-01-29 14:38:19 -08:00
2025-01-24 16:12:12 -08:00
2025-01-17 12:58:49 +01:00
2025-03-05 10:43:25 +01:00
2025-01-26 16:12:44 -08:00
2025-01-20 13:10:15 +01:00
2025-01-28 12:25:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-31 11:49:30 -08:00
2025-01-27 16:51:51 -08:00
2025-01-28 12:25:12 -08:00
2025-01-27 15:26:06 -08:00
2025-01-28 14:16:46 -08:00
2025-01-27 09:39:25 -05:00
2025-01-24 11:32:13 -08:00
2025-01-21 09:00:31 -08:00
2025-01-27 15:26:06 -08:00
2025-01-09 10:54:19 +01:00
2025-01-25 16:19:10 -08:00
2025-01-29 11:39:20 -08:00
2025-01-08 18:04:36 +01:00