diff options
author | Pi-Hsun Shih <pihsun@chromium.org> | 2019-11-10 09:29:10 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2019-11-10 09:29:10 +0300 |
commit | df4a3e7f88e3b0d7ae46d70b9ff8e3c0ea730785 (patch) | |
tree | a5d2f4308b8536a97e704d63af4addfbdee99d26 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 2df200ab234a86836a8879a05a8007d6b884eb14 (diff) | |
download | linux-df4a3e7f88e3b0d7ae46d70b9ff8e3c0ea730785.tar.xz |
media: v4l2-ctrl: Lock main_hdl on operations of requests_queued.
There's a race condition between the list_del_init in the
v4l2_ctrl_request_complete, and the list_add_tail in the
v4l2_ctrl_request_queue, since they can be called in different thread
and the requests_queued list is not protected by a lock. This can lead
to that the v4l2_ctrl_handler is still in the requests_queued list while
the request_is_queued is already set to false, which would cause
use-after-free if the v4l2_ctrl_handler is later released.
Fix this by locking the ->lock of main_hdl (which is the owner of the
requests_queued list) when doing list operations on the
->requests_queued list.
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions