lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()
Date


> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, April 27, 2015 7:57 PM
> To: KY Srinivasan
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com
> Subject: Re: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()
>
> From: "K. Y. Srinivasan" <kys@microsoft.com>
> Date: Mon, 27 Apr 2015 18:14:50 -0700
>
> > Commit commit b08cc79155fc26d0d112b1470d1ece5034651a4b eliminated
> memory
> > allocation in the packet send path. This commit introduced a bug since it
> > did not account for the case if the skb was cloned. Fix this bug by
> > using the pre-reserved head room only if the skb is not cloned.
> >
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
>
> We have generic infrastructure to do this, please try instead:
>
> err = skb_cow_head(skb, pkt_sz);
>
> this will take care of everything for you and you can get rid
> of all of this dynamic memory allocation etc. in this code
> path.

Thanks David; I will resubmit this patch.

Regards,

K. Y


\
 
 \ /
  Last update: 2015-04-28 05:41    [W:0.058 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site