Re: [PATCH 11/21] vhost-vdpa: introduce asid based IOTLB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020/12/29 下午8:05, Eli Cohen wrote:
+
+static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
The return value is never interpreted. I think it should either be made
void or return values checked.


Right, will make it void.



+{
+	struct vhost_vdpa_as *as = asid_to_as(v, asid);
+
+	/* Remove default address space is not allowed */
+	if (asid == 0)
+		return -EINVAL;
Can you explain why? I think you have a memory leak due to this as no
one will ever free as with id 0.


Looks like a bug. Will remove this.

Thanks


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux