From patchwork Tue Nov 22 17:48:12 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: 9441765 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 768CF60237 for ; Tue, 22 Nov 2016 17:48:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E5D227DA4 for ; Tue, 22 Nov 2016 17:48:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6345228596; Tue, 22 Nov 2016 17:48:35 +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 2063E27DA4 for ; Tue, 22 Nov 2016 17:48:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933721AbcKVRsd (ORCPT ); Tue, 22 Nov 2016 12:48:33 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:60418 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933722AbcKVRs0 (ORCPT ); Tue, 22 Nov 2016 12:48:26 -0500 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1c9F8d-0000MQ-6C; Tue, 22 Nov 2016 18:45:47 +0100 From: Sebastian Andrzej Siewior To: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Chad Dupuis , rt@linutronix.de, QLogic-Storage-Upstream@qlogic.com, Johannes Thumshirn , Christoph Hellwig , Sebastian Andrzej Siewior Subject: [PATCH 4/5] scsi: bnx2fc: annoate unlock + release for sparse Date: Tue, 22 Nov 2016 18:48:12 +0100 Message-Id: <20161122174813.16184-5-bigeasy@linutronix.de> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161122174813.16184-1-bigeasy@linutronix.de> References: <20161122174813.16184-1-bigeasy@linutronix.de> MIME-Version: 1.0 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;