From patchwork Wed Nov 23 08:03:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amrani, Ram" X-Patchwork-Id: 9442691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 741E76075F for ; Wed, 23 Nov 2016 08:03:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6466320649 for ; Wed, 23 Nov 2016 08:03:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5781C208C2; Wed, 23 Nov 2016 08:03:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8685B203C0 for ; Wed, 23 Nov 2016 08:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932540AbcKWIDH (ORCPT ); Wed, 23 Nov 2016 03:03:07 -0500 Received: from mail-by2nam03on0081.outbound.protection.outlook.com ([104.47.42.81]:5216 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932484AbcKWIDH (ORCPT ); Wed, 23 Nov 2016 03:03:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=pXBXC4GJM9zpxXNMMmM+UnkF8uyyZgqUGPiItsxAlHU=; b=k/T86KBDjOL0awoKImguHVY3z7286PkGtAWBMcEH9Y1NqxwZldNJhGFgeM7FiZWNQ0d+Wq1m2hg/jIvYX23xx2jaKmopluDGnIQ8A5cXWN9OIaVl1hO3q18AG37F1anMdbtuP71krGgEN4RtPeQi7ohihAfxGYHpa5J0J7SoBjY= Received: from SN1PR07MB2207.namprd07.prod.outlook.com (10.164.47.29) by SN1PR07MB2320.namprd07.prod.outlook.com (10.169.127.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8; Wed, 23 Nov 2016 08:03:05 +0000 Received: from SN1PR07MB2207.namprd07.prod.outlook.com ([10.164.47.29]) by SN1PR07MB2207.namprd07.prod.outlook.com ([10.164.47.29]) with mapi id 15.01.0734.014; Wed, 23 Nov 2016 08:03:04 +0000 From: "Amrani, Ram" To: "dledford@redhat.com" CC: "Elior, Ariel" , "Kalderon, Michal" , "Mintz, Yuval" , "linux-rdma@vger.kernel.org" Subject: [PATCH] qede: fix general protection fault may occur on probe Thread-Topic: [PATCH] qede: fix general protection fault may occur on probe Thread-Index: AdJFX/Xh+JSkYtb8SD2mgW2E8kd49Q== Date: Wed, 23 Nov 2016 08:03:04 +0000 Message-ID: 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=Ram.Amrani@cavium.com; x-originating-ip: [31.168.140.228] x-microsoft-exchange-diagnostics: 1; SN1PR07MB2320; 7:jnC5wH/xSQyTW7OZPWn0b9KzMIDUlx5S86D7h68qq23ohih2d4F+QodJvSyfTQhJNcmZji5kcCQJscl01BSX+iNwTBDoIK/V9tnhEiwuoNRk0fTaph6LbDFzXUg3sauqFdd87iE59I0HHu6T+zyibv7+9WqoImbuwJFzSgApDSnWwtYtAzHTvTSf6lFO79TOGOqWZraBwOGgxYW/Je6ojUIJ1ezc2TGbXWJ/ovfHp+QTALULg8QvYdgDCVSuEZ6jHG4mFhTJvAMlwDehrGG06hqHwNZTpBofqRbZhOGn9aQ5HYMAzKzH4VCsaV/hvtn8+g9xz3TO2pF1N5ZKZl6/8EuO5nyL4129sHC8tUc7mBk= x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10009020)(6009001)(7916002)(189002)(199003)(2351001)(99286002)(8676002)(86362001)(105586002)(76576001)(3280700002)(33656002)(189998001)(101416001)(97736004)(2501003)(106356001)(122556002)(66066001)(2900100001)(54356999)(50986999)(68736007)(92566002)(38730400001)(7696004)(3660700001)(81156014)(81166006)(2906002)(1730700003)(110136003)(8936002)(9686002)(4326007)(5660300001)(6506003)(305945005)(77096005)(7736002)(3846002)(102836003)(6116002)(74316002)(5640700001)(7846002)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2320; H:SN1PR07MB2207.namprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 9f3f96c8-004e-49dc-a040-08d413772721 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN1PR07MB2320; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040307)(6060326)(6045199)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6061324)(6041248); SRVR:SN1PR07MB2320; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2320; x-forefront-prvs: 013568035E received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2016 08:03:04.2401 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2320 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The recent introduction of qedr driver support in qede causes a GPF when probing the driver in a server without a RoCE enabled QLogic NIC. This fix avoids using an uninitialized pointer in such a case. Caught by the kernel test robot. Signed-off-by: Ram Amrani --- drivers/net/ethernet/qlogic/qede/qede_roce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/qlogic/qede/qede_roce.c b/drivers/net/ethernet/qlogic/qede/qede_roce.c index 9867f96..4927271 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_roce.c +++ b/drivers/net/ethernet/qlogic/qede/qede_roce.c @@ -191,8 +191,8 @@ int qede_roce_register_driver(struct qedr_driver *drv) } mutex_unlock(&qedr_dev_list_lock); - DP_INFO(edev, "qedr: discovered and registered %d RoCE funcs\n", - qedr_counter); + pr_notice("qedr: discovered and registered %d RoCE funcs\n", + qedr_counter); return 0; }