diff options
| author | Yuchan Nam <entropy1110@gmail.com> | 2026-03-06 21:52:23 +0900 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2026-03-18 11:21:31 +0100 |
| commit | bef4f4a88b73e4cc550d25f665b8a9952af22773 (patch) | |
| tree | 234d6b14978d933251f2404d6d17ba564948a012 /Documentation/networking/timestamping/git@git.tavy.me:linux.git | |
| parent | ac62a20035ecc18e6d365c6c792f5965ce1da77c (diff) | |
media: mc, v4l2: serialize REINIT and REQBUFS with req_queue_mutex
MEDIA_REQUEST_IOC_REINIT can run concurrently with VIDIOC_REQBUFS(0)
queue teardown paths. This can race request object cleanup against vb2
queue cancellation and lead to use-after-free reports.
We already serialize request queueing against STREAMON/OFF with
req_queue_mutex. Extend that serialization to REQBUFS, and also take
the same mutex in media_request_ioctl_reinit() so REINIT is in the
same exclusion domain.
This keeps request cleanup and queue cancellation from running in
parallel for request-capable devices.
Fixes: 6093d3002eab ("media: vb2: keep a reference to the request until dqbuf")
Cc: stable@vger.kernel.org
Signed-off-by: Yuchan Nam <entropy1110@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'Documentation/networking/timestamping/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
