Re: [PATCH] media: atomisp: add missing mutex in atomisp_vidioc_default()

From: Andy Shevchenko

Date: Thu Feb 05 2026 - 01:27:41 EST


On Thu, Feb 5, 2026 at 6:37 AM Ziyi Guo <n7l8m4@xxxxxxxxxxxxxxxxxx> wrote:
>
> atomisp_vidioc_default() calls atomisp_exp_id_unlock(),
> atomisp_exp_id_capture(), and atomisp_inject_a_fake_event() without
> holding isp->mutex. However, all three functions have
> lockdep_assert_held(&isp->mutex) indicating callers must hold this lock.

Did you get a splat on real HW?

> Other ioctl handlers in the same driver (e.g., atomisp_start_streaming)
> properly acquire the mutex before operating on ISP state.
>
> Add mutex_lock()/mutex_unlock() around these three ioctl cases to fix the
> missing lock protection.

How did you find the issue?

--
With Best Regards,
Andy Shevchenko