Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933035AbbD1DYA (ORCPT ); Mon, 27 Apr 2015 23:24:00 -0400 Received: from mail-bn1on0142.outbound.protection.outlook.com ([157.56.110.142]:35961 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932169AbbD1DX7 convert rfc822-to-8bit (ORCPT ); Mon, 27 Apr 2015 23:23:59 -0400 From: KY Srinivasan To: David Miller 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() Thread-Topic: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit() Thread-Index: AQHQgUW042sUeQfzBEWjjrDct92Exp1hu32AgAAHUEA= Date: Tue, 28 Apr 2015 03:23:52 +0000 Message-ID: References: <1430183690-24198-1-git-send-email-kys@microsoft.com> <20150427.225709.1737864122610182544.davem@davemloft.net> In-Reply-To: <20150427.225709.1737864122610182544.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: davemloft.net; dkim=none (message not signed) header.d=none; x-originating-ip: [2601:8:9b00:fd:e045:b201:28d3:1cd1] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0709; x-forefront-antispam-report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(377454003)(51704005)(13464003)(43544003)(2900100001)(92566002)(33656002)(110136001)(46102003)(19580405001)(40100003)(122556002)(99286002)(86612001)(86362001)(74316001)(19580395003)(575784001)(87936001)(2656002)(62966003)(2950100001)(76576001)(102836002)(54356999)(50986999)(77156002)(76176999)(106116001)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB0709;H:BY2PR0301MB0711.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006)(3002001);SRVR:BY2PR0301MB0709;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0709; x-forefront-prvs: 0560A2214D Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2015 03:23:52.2058 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0709 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1361 Lines: 40 > -----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" > 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 > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/