Netdev List
 help / color / mirror / Atom feed
From: Asias He <asias@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: acking@vmware.com, kvm@vger.kernel.org, dtor@vmware.com,
	netdev@vger.kernel.org, grantr@vmware.com,
	virtualization@lists.linux-foundation.org, penberg@kernel.org,
	mst@redhat.com, sasha.levin@oracle.com
Subject: Re: [RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
Date: Sun, 30 Jun 2013 07:45:50 +0800	[thread overview]
Message-ID: <20130629234550.GC11388@hj.localdomain> (raw)
In-Reply-To: <20130628.213225.150653146873611065.davem@davemloft.net>

Hi David,

On Fri, Jun 28, 2013 at 09:32:25PM -0700, David Miller wrote:
> From: Asias He <asias@redhat.com>
> 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

  reply	other threads:[~2013-06-29 23:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  7:59 [RFC 0/5] Introduce VM Sockets virtio transport Asias He
2013-06-27  8:00 ` [RFC 1/5] VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic Asias He
2013-06-27  8:00 ` [RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko Asias He
2013-06-27 10:34   ` Michael S. Tsirkin
2013-06-28  6:28     ` Asias He
2013-06-29  4:32   ` David Miller
2013-06-29 23:45     ` Asias He [this message]
2013-06-27  8:00 ` [RFC 3/5] VSOCK: Introduce virtio-vsock.ko Asias He
2013-06-27  8:00 ` [RFC 4/5] VSOCK: Introduce vhost-vsock.ko Asias He
2013-06-27 10:42   ` Michael S. Tsirkin
2013-06-28  2:38     ` Andy King
2013-06-28  6:55     ` Asias He
2013-06-27  8:00 ` [RFC 5/5] VSOCK: Add Makefile and Kconfig Asias He
2013-06-27 10:23 ` [RFC 0/5] Introduce VM Sockets virtio transport Michael S. Tsirkin
2013-06-28  2:25   ` Andy King
2013-06-28  5:50     ` Asias He
2013-06-28  6:12   ` Asias He
2013-06-27 19:03 ` Sasha Levin
2013-06-28  6:26   ` Asias He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130629234550.GC11388@hj.localdomain \
    --to=asias@redhat.com \
    --cc=acking@vmware.com \
    --cc=davem@davemloft.net \
    --cc=dtor@vmware.com \
    --cc=grantr@vmware.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=penberg@kernel.org \
    --cc=sasha.levin@oracle.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox