Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755438AbdCTXeR (ORCPT ); Mon, 20 Mar 2017 19:34:17 -0400 Received: from mga02.intel.com ([134.134.136.20]:63957 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754209AbdCTXeH (ORCPT ); Mon, 20 Mar 2017 19:34:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,196,1486454400"; d="scan'208";a="946404608" From: "Keller, Jacob E" To: Colin King , "Kirsher, Jeffrey T" , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" CC: "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [Intel-wired-lan] [PATCH] i40e: fix memcpy with swapped arguments Thread-Topic: [Intel-wired-lan] [PATCH] i40e: fix memcpy with swapped arguments Thread-Index: AQHSoYjRqYGGPEy6a0+cU65Bjk59AaGeYCeA Date: Mon, 20 Mar 2017 23:33:06 +0000 Message-ID: <02874ECE860811409154E81DA85FBB5857DAF748@ORSMSX115.amr.corp.intel.com> References: <20170320144627.11524-1-colin.king@canonical.com> In-Reply-To: <20170320144627.11524-1-colin.king@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODQ2ODQ3NzctMDk0Yi00YzM3LTg1NjItMmYwODA3YmU5OGFhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImlhTm9hcWIzVGZVS1FtM1wvQkZwSG5CMUhBK2E5YjBYNHVCeDVtQTU2RnN3PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v2KNYeks028265 Content-Length: 1363 Lines: 31 > -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On > Behalf Of Colin King > Sent: Monday, March 20, 2017 7:46 AM > To: Kirsher, Jeffrey T ; intel-wired- > lan@lists.osuosl.org; netdev@vger.kernel.org > Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [Intel-wired-lan] [PATCH] i40e: fix memcpy with swapped arguments > > From: Colin Ian King Hi there, > > The current code copies an uninitialized params into > cdev->lan_info.params and then passes the uninitialized params > to the call cdev->client->ops->l2_param_change. I believe the > order of the source and destination in the memcpy is the wrong > way around and should be swapped. > So you are correct that params is uninitialized. However, the fix here is not correct. Somehow we dropped the code for initializing the parameters. See commit d7ce6422d6e6 ("i40e: don't check params until after checking for client instance", 2017-02-09) It looks like the commit itself was malformed when applied upstream, and a later commit which should have preserved the changes 3140aa9a78c9 ("i40e: KISS the client interface", 2017-03-14) accidentally dropped them. I'll provide a patch to get this back into the correct state. Thanks for catching this. Regards, Jake