From: Dexuan Cui <decui@microsoft.com>
To: KY Srinivasan <kys@microsoft.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"apw@canonical.com" <apw@canonical.com>,
"jasowang@redhat.com" <jasowang@redhat.com>
Subject: RE: [PATCH V2 net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()
Date: Wed, 29 Apr 2015 03:51:44 +0000 [thread overview]
Message-ID: <066b094eb64e418e835c066214d8ef73@SIXPR30MB031.064d.mgd.msft.net> (raw)
In-Reply-To: <1430269188-31701-1-git-send-email-kys@microsoft.com>
> -----Original Message-----
> From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On
> Behalf Of K. Y. Srinivasan
> Sent: Wednesday, April 29, 2015 9:00
> To: davem@davemloft.net; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com
> Subject: [PATCH V2 net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()
>
> Commit b08cc79155fc26d0d112b1470d1ece5034651a4b eliminated
> memory
> allocation in the packet send path:
>
> "hv_netvsc: Eliminate memory allocation in the packet send path
>
> The network protocol used to communicate with the host is the remote
> ndis (rndis)
> protocol. We need to decorate each outgoing packet with a rndis header
> and
> additional rndis state (rndis per-packet state). To manage this state, we
> currently allocate memory in the transmit path. Eliminate this allocation
> by
> requesting additional head room in the skb."
>
> This commit introduced a bug since it did not account for the case if the skb
> was cloned. Fix this bug.
>
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
> V2: Used skb_cow_head() based on Dave Miller's feedback
> V2: Fixed up the commit log based on feedback from Sergei
> Shtylyov
>
> drivers/net/hyperv/hyperv_net.h | 1 -
> drivers/net/hyperv/netvsc.c | 5 -----
> drivers/net/hyperv/netvsc_drv.c | 27 +++++++--------------------
> 3 files changed, 7 insertions(+), 26 deletions(-)
Without the patch, the guest can panic due to memory corruption.
I confirm the patch can fix the panic I saw.
Tested-by: Dexuan Cui <decui@microsoft.com>
-- Dexuan
next prev parent reply other threads:[~2015-04-29 3:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 0:59 K. Y. Srinivasan
2015-04-29 3:51 ` Dexuan Cui [this message]
2015-04-29 19:21 ` David Miller
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=066b094eb64e418e835c066214d8ef73@SIXPR30MB031.064d.mgd.msft.net \
--to=decui@microsoft.com \
--cc=apw@canonical.com \
--cc=davem@davemloft.net \
--cc=devel@linuxdriverproject.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
/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
all inboxes | Powered by JetHome®