From patchwork Wed Nov 21 06:58:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10692051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0719E15A7 for ; Wed, 21 Nov 2018 06:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D54A28B1B for ; Wed, 21 Nov 2018 06:58:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 009E02B985; Wed, 21 Nov 2018 06:58:31 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 A721D2B980 for ; Wed, 21 Nov 2018 06:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbeKURbq (ORCPT ); Wed, 21 Nov 2018 12:31:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49694 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727343AbeKURbq (ORCPT ); Wed, 21 Nov 2018 12:31:46 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA6B84E33B; Wed, 21 Nov 2018 06:58:30 +0000 (UTC) Received: from lhg.nay.redhat.com (unknown [10.66.129.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7770F2C8C6; Wed, 21 Nov 2018 06:58:29 +0000 (UTC) From: Honggang LI To: hal@dev.mellanox.co.il Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [opensm patch 4/6] opensm/osm_mlnx_ext_port_info_rcv.c: Check the pointer of osm_sm_t before access it Date: Wed, 21 Nov 2018 14:58:09 +0800 Message-Id: <20181121065811.21806-4-honli@redhat.com> In-Reply-To: <20181121065811.21806-3-honli@redhat.com> References: <20181121065811.21806-1-honli@redhat.com> <20181121065811.21806-2-honli@redhat.com> <20181121065811.21806-3-honli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 21 Nov 2018 06:58:30 +0000 (UTC) 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 From: Honggang Li Signed-off-by: Honggang Li --- opensm/osm_mlnx_ext_port_info_rcv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opensm/osm_mlnx_ext_port_info_rcv.c b/opensm/osm_mlnx_ext_port_info_rcv.c index 8151bbce..e4f8521e 100644 --- a/opensm/osm_mlnx_ext_port_info_rcv.c +++ b/opensm/osm_mlnx_ext_port_info_rcv.c @@ -73,9 +73,10 @@ void osm_mlnx_epi_rcv_process(IN void *context, IN void *data) ib_net64_t port_guid, node_guid; uint8_t port_num, portnum, start_port = 1; + CL_ASSERT(sm); + OSM_LOG_ENTER(sm->p_log); - CL_ASSERT(sm); CL_ASSERT(p_madw); p_smp = osm_madw_get_smp_ptr(p_madw);