Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752546AbdHGHlA (ORCPT ); Mon, 7 Aug 2017 03:41:00 -0400 Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:13184 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752190AbdHGHk5 (ORCPT ); Mon, 7 Aug 2017 03:40:57 -0400 From: "Tayar, Tomer" To: Christophe JAILLET , "Mintz, Yuval" , "Elior, Ariel" , Dept-Eng Everest Linux L2 CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: RE: [PATCH] qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()' Thread-Topic: [PATCH] qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()' Thread-Index: AQHTDv9qvgLITPIGgE6i5Sb26InLHaJ4gkkg Date: Mon, 7 Aug 2017 07:40:54 +0000 Message-ID: References: <20170806220017.20465-1-christophe.jaillet@wanadoo.fr> In-Reply-To: <20170806220017.20465-1-christophe.jaillet@wanadoo.fr> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tomer.Tayar@cavium.com; x-originating-ip: [31.168.140.228] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN3PR0701MB1329;6:LOoimXvpiW34A3/bbQtM+qo2O9nLHiyYr60Ndi0qUVFmzWMwJYRDmumyXJy5L5T2vRIxsT0bqgGb1zHXwpMzI944aSO7CLS6Vlg1i8D4o9ssyzEWejeJdxH8poUNK7MfFQO3d8A7Ziis+doVbPJvu/UIYuYYCqjwlVTF/C9DZWVH7poQDepQ5EyYSAHJYKlY5aRfZvIkEea1eu50Fuu89GaHXY0hxQ71oFjZ1rfonqIM7O0gQjVX6p3HcjA7l2QvC50/rSjHEFcZBSvzuzydRUuK1BbAoEsDbdeCfqP57eYvugouN6VXe3qEPSzdR9eKs3Py3PbyzuMlU5cFSGs7MQ==;5:Xajjs/+jtsY95YuAbS706bl21v+hU3YfYVoo5LZHOt+kBgDpD3q1XrWfw1kgqvk3hahkkBGG8LjYJT9OQKp3G+w57bBK8QLU26ZnyEKWzkCEmXXoxRuHj5wBH9YlFUSeHq15bklhrJpIvNU3yFoeuQ==;24:9pKXoN17RV3dm2go72HEH55pWAQRAUf3oj/7Gt1zg9z8TsxseiG0AaIKeVvnt6sgNM0bHF8rXeb0fiWxljpLpCOIEJIw7SY5u8HNcql3BIU=;7:EBET3AXmeicd4FspJK42rIZd+eBXNlvJGQ9RGWXLAklPs0yBHBFmzgH9wb2wrr69whs9cE+DAGvpVXyJlyuJ8pNcr3P7sVHFvMP2I9oki8W81QBjWOiVpnSCzXdmAcsmdfS+UU5kP70s+IfswBoFLvvMzfjiwqboP998eN2IS6z4dPKhe6MlM3QEYSPTwq/JLY2/GNX5Fy72AAWEJywKFsYdrBWZMjf0AJlEYMfE0HA= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: ef6b6717-f1d0-4ab0-2880-08d4dd67a2d9 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN3PR0701MB1329; x-ms-traffictypediagnostic: BN3PR0701MB1329: x-exchange-antispam-report-test: UriScan:(155761271638844); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN3PR0701MB1329;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN3PR0701MB1329; x-forefront-prvs: 0392679D18 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39410400002)(39850400002)(39840400002)(39400400002)(39450400003)(189002)(199003)(8676002)(53936002)(6636002)(3846002)(102836003)(6116002)(2906002)(105586002)(3660700001)(2950100002)(106356001)(97736004)(3280700002)(2900100001)(9686003)(6436002)(6246003)(99286003)(54906002)(4326008)(55016002)(478600001)(68736007)(74316002)(25786009)(77096006)(6506006)(33656002)(7696004)(38730400002)(5660300001)(14454004)(66066001)(101416001)(86362001)(7736002)(229853002)(305945005)(81156014)(81166006)(72206003)(50986999)(189998001)(76176999)(54356999)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1329;H:BN3PR0701MB1591.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Aug 2017 07:40:54.7249 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1329 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 quoted-printable to 8bit by nfs id v777fDqN016220 Content-Length: 450 Lines: 16 > We allocate 'p_info->mfw_mb_cur' and 'p_info->mfw_mb_shadow' but we > check > 'p_info->mfw_mb_addr' instead of 'p_info->mfw_mb_cur'. > > 'p_info->mfw_mb_addr' is never 0, because it is initiliazed a few lines > above in 'qed_load_mcp_offsets()'. > > Update the test and check the result of the 2 'kzalloc()' instead. > > Signed-off-by: Christophe JAILLET Thanks Acked-by: Tomer Tayar