From patchwork Wed Sep 5 13:53:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 10588895 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 0F17C5A4 for ; Wed, 5 Sep 2018 13:53:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3DE028926 for ; Wed, 5 Sep 2018 13:53:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7CE82A208; Wed, 5 Sep 2018 13:53:51 +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 9E0D928926 for ; Wed, 5 Sep 2018 13:53:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727814AbeIESYK (ORCPT ); Wed, 5 Sep 2018 14:24:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:59430 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726219AbeIESYK (ORCPT ); Wed, 5 Sep 2018 14:24:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7A47FAF02; Wed, 5 Sep 2018 13:53:49 +0000 (UTC) From: Hannes Reinecke To: "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , Chad Dupuis , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH 0/5] qedf: fixup NULL pointer reference in fc_lookup_rport() Date: Wed, 5 Sep 2018 15:53:42 +0200 Message-Id: <20180905135347.138195-1-hare@suse.de> X-Mailer: git-send-email 2.16.4 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 Hi all, occasionally the qedf driver will crash in fc_lookup_rport() due to missing locking and incorrect reference counting of the fc_rport_priv() structure from libfc. This patchset fixes up the reference counting and ensures that the locking rules of libfc are followed. As usual, comments and reviews are welcome. Hannes Reinecke (5): qedf: fixup bit operations qedf: fixup locking in qedf_restart_rport() qedf: missing kref_put in qedf_xmit() qedf: remove stale variables in qedf_eh_XXX functions qedf: fc_rport_priv reference counting fixes drivers/scsi/qedf/qedf_els.c | 26 ++++++++++++++++++++++---- drivers/scsi/qedf/qedf_io.c | 32 ++++++++++++++++++++++---------- drivers/scsi/qedf/qedf_main.c | 25 ++++++++++++------------- 3 files changed, 56 insertions(+), 27 deletions(-)