]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: iris: Add sanity check for stop streaming
authorWangao Wang <wangao.wang@oss.qualcomm.com>
Mon, 27 Oct 2025 09:35:59 +0000 (17:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:19 +0000 (12:57 +0100)
commitf8b136296722e258ec43237a35f72c92a6d4501a
tree0ad658eea6cc4a75ce9c037290acdcac1f34dfc2
parent24a2062257bbdfc831de5ed21c27b04b5bdf2437
media: iris: Add sanity check for stop streaming

commit ad699fa78b59241c9d71a8cafb51525f3dab04d4 upstream.

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")
Cc: stable@vger.kernel.org
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
[bod: remove qcom from patch title]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/qcom/iris/iris_vb2.c