Acked-by: Xie XiuQi xiexiuqi@huawei.com
On 2021/12/13 19:45, Keqian Zhu wrote:
Hi Jiacheng,
Reviewed-by: Keqian Zhu zhukeqian1@huawei.com
这是一个有效补丁,good job!
ps:后续补丁可以抄送一下相关maintainer和原补丁作者,可以让你的补丁得到更快响应。
Thanks, Keqian
On 2021/12/13 11:48, Jiacheng Shi wrote:
Variables allocated by kvmalloc should not be freed by kfree. Because they may be allocated by vmalloc. So we replace kfree with kvfree here.
Fixes: 738fe155f58b ("vfio/iommu_type1: Add support for manual dirty log clear") Signed-off-by: Jiacheng Shi billsjc@sjtu.edu.cn
drivers/vfio/vfio_iommu_type1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 5daceec48811..6811a85109aa 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -1150,7 +1150,7 @@ static int vfio_iova_dirty_log_clear(u64 __user *bitmap, }
out:
- kfree(bitmap_buffer);
- kvfree(bitmap_buffer); return ret;
}
.