Re: [RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko

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

 



Hi David,

On Fri, Jun 28, 2013 at 09:32:25PM -0700, David Miller wrote:
> From: Asias He <asias@xxxxxxxxxx>
> Date: Thu, 27 Jun 2013 16:00:01 +0800
> 
> > +static void
> > +virtio_transport_recv_dgram(struct sock *sk,
> > +			    struct virtio_vsock_pkt *pkt)
>  ...
> > +	memcpy(skb->data, pkt, sizeof(*pkt));
> > +	memcpy(skb->data + sizeof(*pkt), pkt->buf, pkt->len);
> 
> Are you sure this is right?
> 
> Shouldn't you be using "sizeof(struct virtio_vsock_hdr)" instead of
> "sizeof(*pkt)".  'pkt' is "struct virtio_vsock_pkt" and has all kinds
> of meta-data you probably don't mean to include in the SKB.

Right, virtio_vsock_hdr is enough. Will fix this.

Thanks for looking at this. 

-- 
Asias
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux