mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: iris: Report unreleased PERSIST buffers on session close
Add error reporting for unreleased PERSIST internal buffers in iris_check_num_queued_internal_buffers(). This ensures all buffer types are checked and logged if not freed during session close, helping to detect memory leaks and improve driver robustness. No change to buffer lifecycle or allocation logic. Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # X1E80100 Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e80100-crd Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
cba6aed422
commit
42e81c262c
@@ -246,6 +246,14 @@ static void iris_check_num_queued_internal_buffers(struct iris_inst *inst, u32 p
|
||||
dev_err(inst->core->dev, "%d buffer of type %d not released",
|
||||
count, internal_buf_type[i]);
|
||||
}
|
||||
|
||||
buffers = &inst->buffers[BUF_PERSIST];
|
||||
|
||||
count = 0;
|
||||
list_for_each_entry_safe(buf, next, &buffers->list, list)
|
||||
count++;
|
||||
if (count)
|
||||
dev_err(inst->core->dev, "%d buffer of type BUF_PERSIST not released", count);
|
||||
}
|
||||
|
||||
int iris_close(struct file *filp)
|
||||
|
||||
Reference in New Issue
Block a user