aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHans Verkuil <[email protected]>2024-02-23 09:45:36 +0100
committerHans Verkuil <[email protected]>2024-04-24 13:49:55 +0200
commit1ed4477f2ea4743e7c5e1f9f3722152d14e6eeb1 (patch)
treec182d3df80fc09f733495ab60150518d5bce9ca8 /tools/perf/scripts/python
parente42a204f0519a2540f1507ac2798be2aeaa76bee (diff)
media: v4l2-core: hold videodev_lock until dev reg, finishes
After the new V4L2 device node was registered, some additional initialization was done before the device node was marked as 'registered'. During the time between creating the device node and marking it as 'registered' it was possible to open the device node, which would return -ENODEV since the 'registered' flag was not yet set. Hold the videodev_lock mutex from just before the device node is registered until the 'registered' flag is set. Since v4l2_open will take the same lock, it will wait until this registration process is finished. This resolves this race condition. Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Cc: <[email protected]> # for vi4.18 and up
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions