Re: [PATCH v3] media: qcom: iris: Add sanity check for stop streaming

From: Vikash Garodia

Date: Tue Oct 28 2025 - 08:37:38 EST



On 10/27/2025 3:05 PM, Wangao Wang wrote:
> Add sanity check in iris_vb2_stop_streaming. If inst->state is
> already IRIS_INST_ERROR, we should skip the stream_off operation
> because it would still send packets to the firmware.
>
> In iris_kill_session, inst->state is set to IRIS_INST_ERROR and
> session_close is executed, which will kfree(inst_hfi_gen2->packet).
> If stop_streaming is called afterward, it will cause a crash.
>
> Fixes: 11712ce70f8e5 ("media: iris: implement vb2 streaming ops")
>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
> Reviewed-by: Dikshita Agarwal <dikshita.agarwal@xxxxxxxxxxxxxxxx>
> Signed-off-by: Wangao Wang <wangao.wang@xxxxxxxxxxxxxxxx>

Reviewed-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>