Commit 908a779
committed
iommufd: Initialize the flags of vevent in iommufd_viommu_report_event()
JIRA: https://issues.redhat.com/browse/RHEL-114131
Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
commit 41464a4
Author: Yi Liu <yi.l.liu@intel.com>
Date: Mon Mar 24 05:00:33 2025 -0700
iommufd: Initialize the flags of vevent in iommufd_viommu_report_event()
The vevent->header.flags is not initialized per allocation, hence the
vevent read path may treat the vevent as lost_events_header wrongly.
Use kzalloc() to alloc memory for new vevent.
Fixes: e8e1ef9 ("iommufd/viommu: Add iommufd_viommu_report_event helper")
Link: https://patch.msgid.link/r/20250324120034.5940-2-yi.l.liu@intel.com
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
(cherry picked from commit 41464a4)
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>1 parent 92b6cef commit 908a779
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
0 commit comments