Loading
iommufd/driver: Fix counter initialization for counted_by annotation
One of the requirements for counted_by annotations is that the counter member must be initialized before the first reference to the flexible-array member. Move the vevent->data_len = data_len; initialization to before the first access to flexible array vevent->event_data. Link: https://patch.msgid.link/r/aRL7ZFFqM5bRTd2D@kspp Cc: stable@vger.kernel.org Fixes: e8e1ef9b ("iommufd/viommu: Add iommufd_viommu_report_event helper") Signed-off-by:"Gustavo A. R. Silva" <gustavoars@kernel.org> Reviewed-by:
Kevin Tian <kevin.tian@intel.com> Reviewed-by:
Nicolin Chen <nicolinc@nvidia.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>