Commit 32ef4b71 authored by Kees Cook's avatar Kees Cook

media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Add __counted_by annotation

The only direct user of struct hfi_session_release_buffer_pkt is
pkt_session_unset_buffers() which sets "num_buffers" before using it
as a loop counter for accessing "buffer_info". Add the __counted_by
annotation to reflect the relationship.
Reviewed-by: default avatarVikash Garodia <quic_vgarodia@quicinc.com>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: default avatarDikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240710230914.3156277-2-kees@kernel.orgSigned-off-by: default avatarKees Cook <kees@kernel.org>
parent c9345277
......@@ -227,7 +227,7 @@ struct hfi_session_release_buffer_pkt {
u32 extradata_size;
u32 response_req;
u32 num_buffers;
u32 buffer_info[];
u32 buffer_info[] __counted_by(num_buffers);
};
struct hfi_session_release_resources_pkt {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment