Commit 46e0505
committed
iommufd/selftest: Fix iommufd_test_dirty() to handle <u8 bitmaps
JIRA: https://issues.redhat.com/browse/RHEL-40162
Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
commit 9560393
Author: Joao Martins <joao.m.martins@oracle.com>
Date: Thu Jun 27 12:00:56 2024 +0100
iommufd/selftest: Fix iommufd_test_dirty() to handle <u8 bitmaps
The calculation returns 0 if it sets less than the number of bits per
byte. For calculating memory allocation from bits, lets round it up to
one byte.
Link: https://lore.kernel.org/r/20240627110105.62325-3-joao.m.martins@oracle.com
Reported-by: Matt Ochs <mochs@nvidia.com>
Fixes: a9af47e ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP")
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Matt Ochs <mochs@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
(cherry picked from commit 9560393)
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>1 parent 04734de commit 46e0505
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | | - | |
| 1337 | + | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | 1340 | | |
| |||
0 commit comments