From patchwork Wed Aug 17 10:10:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 9285499 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 AB2EA6086A for ; Wed, 17 Aug 2016 10:10:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99E7028513 for ; Wed, 17 Aug 2016 10:10:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E8D428804; Wed, 17 Aug 2016 10:10:22 +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.9 required=2.0 tests=BAYES_00,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 3E9062880E for ; Wed, 17 Aug 2016 10:10:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751437AbcHQKKV (ORCPT ); Wed, 17 Aug 2016 06:10:21 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40555 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbcHQKKU (ORCPT ); Wed, 17 Aug 2016 06:10:20 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1bZxnc-0000fi-Ad; Wed, 17 Aug 2016 12:10:16 +0200 From: Sebastian Andrzej Siewior To: linux-scsi@vger.kernel.org Cc: Johannes Thumshirn , rt@linutronix.de, "James E.J. Bottomley" , "Martin K. Petersen" , QLogic-Storage-Upstream@qlogic.com, Christoph Hellwig , Chad Dupuis , Sebastian Andrzej Siewior Subject: [REPOST PATCH 4/5] scsi: bnx2fc: annoate unlock + release for sparse Date: Wed, 17 Aug 2016 12:10:02 +0200 Message-Id: <20160817101003.30055-4-bigeasy@linutronix.de> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160817101003.30055-1-bigeasy@linutronix.de> References: <20160817101003.30055-1-bigeasy@linutronix.de> 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 The caller of bnx2fc_abts_cleanup() holds the tgt->tgt_lock lock and it is expected to release the lock during wait_for_completion() and acquire the lock afterwards. This patch was only compile-tested due to -ENODEV. Cc: QLogic-Storage-Upstream@qlogic.com Cc: Christoph Hellwig Signed-off-by: Sebastian Andrzej Siewior --- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index f501095f91ac..634e1e539850 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1080,6 +1080,8 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd) } static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req) +__releases(tgt->tgt_lock) +__acquires(tgt->tgt_lock) { struct bnx2fc_rport *tgt = io_req->tgt; int rc = SUCCESS;