All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: asias@redhat.com
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: Fri, 28 Jun 2013 21:32:25 -0700 (PDT)	[thread overview]
Message-ID: <20130628.213225.150653146873611065.davem__11835.6697181754$1372480362$gmane$org@davemloft.net> (raw)
In-Reply-To: <1372320004-20502-3-git-send-email-asias@redhat.com>

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.

  parent reply	other threads:[~2013-06-29  4:32 UTC|newest]

Thread overview: 21+ 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
2013-06-29  4:32   ` David Miller [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  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='20130628.213225.150653146873611065.davem__11835.6697181754$1372480362$gmane$org@davemloft.net' \
    --to=davem@davemloft.net \
    --cc=acking@vmware.com \
    --cc=asias@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.