On Sun May 31 11:20:37 2026 +0530, Dikshita Agarwal wrote:
> iris_allow_cmd() incorrectly checks a sub‑state flag using a logical
> equality comparison. Since sub_state is a bitmask, this allows STOP to
> pass when IRIS_INST_SUB_DRAIN is set alongside other bits, violating the
> intended drain semantics. Fix this by using a proper bitmask test.
> 
> Fixes: d09100763bed ("media: iris: add support for drain sequence")
> Reviewed-by: Bryan O'Donoghue <[email protected]>
> Signed-off-by: Dikshita Agarwal <[email protected]>
> Signed-off-by: Vishnu Reddy <[email protected]>
> Signed-off-by: Bryan O'Donoghue <[email protected]>

Patch committed.

Thanks,
Bryan O'Donoghue

 drivers/media/platform/qcom/iris/iris_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/platform/qcom/iris/iris_state.c 
b/drivers/media/platform/qcom/iris/iris_state.c
index e991f34916ec..5552725c614e 100644
--- a/drivers/media/platform/qcom/iris/iris_state.c
+++ b/drivers/media/platform/qcom/iris/iris_state.c
@@ -269,7 +269,7 @@ bool iris_allow_cmd(struct iris_inst *inst, u32 cmd)
                                return true;
        } else if (cmd == V4L2_DEC_CMD_STOP || cmd == V4L2_ENC_CMD_STOP) {
                if (vb2_is_streaming(src_q))
-                       if (inst->sub_state != IRIS_INST_SUB_DRAIN)
+                       if (!(inst->sub_state & IRIS_INST_SUB_DRAIN))
                                return true;
        }
 
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to