Commit c780d01
media: vb2: vb2_core_queue_init(): sanity check lock and wait_prepare/finish
Add two new checks:
1) wait_prepare and wait_finish callbacks are either both present or
both unset, you can't mix.
2) if lock == NULL, then wait_prepare (and due to check 1 also
wait_finish) must be present.
These checks should prevent the case where lock == NULL, but there
is no way to release/reacquire whatever lock is used when waiting
for a buffer to arrive in VIDIOC_DQBUF.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>1 parent 7e8ca48 commit c780d01
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2644 | 2644 | | |
2645 | 2645 | | |
2646 | 2646 | | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
2647 | 2655 | | |
2648 | 2656 | | |
2649 | 2657 | | |
| |||
0 commit comments