> -----Original Message----- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of K. Y. Srinivasan > Sent: Wednesday, April 29, 2015 9:00 > To: da...@davemloft.net; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@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 <k...@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 <de...@microsoft.com> -- Dexuan -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html