Commit 9a3552a
committed
vcap/file: fix locking
The fix commit 8c19440 (2025-10-01) locked in flush_capture_data(),
which was ok when called from rewind_file(). But that function is
called also from vidcap_file_process_message() which is called with
mutex already held (CID 896223).
So moving the lock from flush_captured_data() up to rewind_file().
Also CID 896221 is fixed - subsequent s->new_msg was called seemingly
without lock (double lock + 1x unlock considered unlocked). Now in this
context one pair lock/unlock was removed which means that the lock is
still held.
fixes CID 896221, CID 896223, commit 8c194401 parent 44848b6 commit 9a3552a
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | | - | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| |||
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
| 357 | + | |
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
496 | 497 | | |
| 498 | + | |
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
| |||
0 commit comments