From patchwork Wed Aug 2 23:36:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 9877913 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 B831C60360 for ; Wed, 2 Aug 2017 23:37:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAF7E2878E for ; Wed, 2 Aug 2017 23:37:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FE8B28841; Wed, 2 Aug 2017 23:37:53 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 981D82878E for ; Wed, 2 Aug 2017 23:37:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751677AbdHBXhw (ORCPT ); Wed, 2 Aug 2017 19:37:52 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:34540 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168AbdHBXhv (ORCPT ); Wed, 2 Aug 2017 19:37:51 -0400 Received: by mail-qt0-f194.google.com with SMTP id i19so6160788qte.1 for ; Wed, 02 Aug 2017 16:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LAuLERPErg7JNjiMkMI0SRxKxcGRDmvcsZRKjINbAFQ=; b=OpnKFF8OVyCl36Zo9A28h5/2wBU4/nrzY2IrpqmWD4yj7duICRSGhSPzWElryioZKa fEiQMfiUagLNmzqmVnyn2RMtpQb4nm3qtuoSjZtprWBTVj7PTHlhzt8+taZnnpcA4eY2 rMXE2a6DMZiFsdGJK5cS/CIFFXKQI6FNPGoM3x8sBoA5aHnqccr0ECAqWxaVPhlqfam+ R3ofkpjRJUs+7ZSgbsgHz9fm1aSwvvlLTcKIgGNvflcOOA8PXwVzhJeECyj6zryKRtZM MgcgHJhgFj7J92mEvmXBmk8HEqQYIE4LgbqG2ydrULzANVDMprWMcafrD3buZCKogAjj WnkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LAuLERPErg7JNjiMkMI0SRxKxcGRDmvcsZRKjINbAFQ=; b=I5C9I/oAKHjyq4p9I9rZQY0JSXpWF6ySt+Qwwgk/zAuo0lAxdEMYu++2w9VJdLMckQ 8ZJfb+VA4lMGX9+ku8K8ZD57YKlysGFybNnU+Q+gI9QJolpjDbJR7X+JfgGbuaqJkU+C XtvvfAos6xiLQyVne1AtUf1V7ur0Qn2RfkSbwDbl06GIVBZxI/TOc5/P/518CsXAcx2M HNN/23zyi7GirUTox17V7vCOC6Z1MzU0demaZa4NXDnEWp0gn6k/VydnNZjjd8hYFbFt VQOkReQbUCBJJqMXagVk25vQUeJG4Of+3YZ8LMl+ZDcta4oR1KjN8UekQlQSu+tHNVvp sDXg== X-Gm-Message-State: AIVw111jy4TTn07WthxKxMnWCTkv1y7iSfZGdQu2GDNTxt8DOsfa7xZS Ru5S34tIMt1ock1o X-Received: by 10.200.8.188 with SMTP id v57mr32974535qth.213.1501717070291; Wed, 02 Aug 2017 16:37:50 -0700 (PDT) Received: from pallmd1.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id c55sm26260318qta.8.2017.08.02.16.37.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Aug 2017 16:37:49 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: Dick Kennedy , James Smart Subject: [PATCH 01/21] lpfc: Fix opps when ExpressLane is enabled Date: Wed, 2 Aug 2017 16:36:28 -0700 Message-Id: <20170802233648.4573-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170802233648.4573-1-jsmart2021@gmail.com> References: <20170802233648.4573-1-jsmart2021@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dick Kennedy Null pointer dereference in lpfc_sli4_fof_intr_handler The driver does not set up cq->assoc_qp for sli4_hba->oas_cq Initialize cq->assoc_qp before accessing it Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index e948ea05fd33..0615bf9def23 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -13557,6 +13557,9 @@ lpfc_sli4_fof_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe) /* Save EQ associated with this CQ */ cq->assoc_qp = phba->sli4_hba.fof_eq; + /* Save EQ associated with this CQ */ + cq->assoc_qp = phba->sli4_hba.fof_eq; + /* Process all the entries to the OAS CQ */ while ((cqe = lpfc_sli4_cq_get(cq))) { workposted |= lpfc_sli4_fp_handle_cqe(phba, cq, cqe);