]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolut...
authorZiyi Guo <n7l8m4@u.northwestern.edu>
Sat, 31 Jan 2026 22:19:07 +0000 (22:19 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 23 Mar 2026 10:18:33 +0000 (11:18 +0100)
commitcb8bdd3ffca280d014311ab395651d33f58a8708
tree59b5094b97fa0b645746b77f92f171eff6b2a60c
parentf48050436746be75227fbc90066a8658cbe94d17
media: chips-media: wave5: add missing spinlock protection for handle_dynamic_resolution_change()

Add spin_lock_irqsave()/spin_unlock_irqrestore() around the
handle_dynamic_resolution_change() call in initialize_sequence() to fix
the missing lock protection.

initialize_sequence() calls handle_dynamic_resolution_change() without
holding inst->state_spinlock. However, handle_dynamic_resolution_change()
has lockdep_assert_held(&inst->state_spinlock) indicating that callers
must hold this lock.

Other callers of handle_dynamic_resolution_change() properly acquire the
spinlock:
- wave5_vpu_dec_finish_decode()
- wave5_vpu_dec_device_run()

Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Fixes: 9707a6254a8a6b ("media: chips-media: wave5: Add the v4l2 layer")
Cc: stable@vger.kernel.org
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c