Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11791349pjo; Thu, 2 Jan 2020 14:20:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxA6wu4CCHuSjbVtv7MBpdy/oXxIVTLbRUKeraNNA4RbzGPJwfjGe1vZqXq2iNpOqKjs/s/ X-Received: by 2002:a9d:7d81:: with SMTP id j1mr90594059otn.267.1578003645620; Thu, 02 Jan 2020 14:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003645; cv=none; d=google.com; s=arc-20160816; b=BUYPLpIuxAIylw3N952lbXAj9mPf4LuoFGn0WU2zlHeTZcMa9PuOJwPIbh6dDhTSNu P6cH9cESUHyC3svcERhv55/ZtWifBQDJvL/bZus1V2Km8BBerI953L5y9+MY4jc+ScqP OrZBQYRQRO3ijaO5Yp+CK03VzTK/3FsAxbUQtCK983UWkQVQ8ihTuhDe+XMMiPmXrUPR 69ODJ+DyuqyaNSKs5UMV09Xk/L2QfGk1mlZ0hvTuA3o02+lmIRLawO5f1P21TI88ODkP Nnrh9qKaa2msyBqiznNf8ZTiL4ARGqVFwdZhoTknQ1Oco+2+7ILIf2xts1qGVH81BL6W acKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wO/MOpzyTMxCJ1UP3p4uciU3cXjKUb8POVnzPhGNv8I=; b=baQJ8GpLs9lhIQbH5SN2WLUnjpWSw2/Hm9mLEryiWLZ6DJrIz8TcfJ1di8SG108M7E 86MEbe8tEzzKgzH1OY3wa53lbWjXiviRoW352asH9eTsRQXvjjjt7toQmm4e07LFxXJ5 Z/ZtsIWFyCEN4T89D5CGgG3m1wqXRdIwMZCMMhXrjiyp1Ufln9bHZx0SRUmn+fsBiRvC f54GvnprIUBwkoWIBrZAMt451lMCQfAZvbykr4BS+ZberPJ4+cNmsYTn2nZTyRw9oF4e WgxRMjIN6jBJqoY19ndU4cbF4uwOFxAXIkSWZRhZ3LKtm7jbDKZ7lkJcW1VQlWrVLSen Ff1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XjtFmDiQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16si25780191otj.59.2020.01.02.14.20.33; Thu, 02 Jan 2020 14:20:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XjtFmDiQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728516AbgABWTB (ORCPT + 99 others); Thu, 2 Jan 2020 17:19:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:34720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728504AbgABWS7 (ORCPT ); Thu, 2 Jan 2020 17:18:59 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FBD521582; Thu, 2 Jan 2020 22:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003538; bh=Joc9FjlSiz2Sy+hMBbPoK+XA6jLYij35zDIdJ/OEV14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XjtFmDiQD7ZS9y9tkWHayrdYXdAgGzyVJaNn9zgsCuqQlZfXhIMA2J40WQI35pqYr 6S+N6F56Aea7J/zMK4dADAQPrBkA4f/k7vgTNzzdk2+ovM58ONdbagpMneXlk0M5rH uZBBisN+d+evFWOU76ran7y6PHiCfSPOiY1TpDFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 011/114] scsi: csiostor: Dont enable IRQs too early Date: Thu, 2 Jan 2020 23:06:23 +0100 Message-Id: <20200102220030.277009455@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit d6c9b31ac3064fbedf8961f120a4c117daa59932 ] These are called with IRQs disabled from csio_mgmt_tmo_handler() so we can't call spin_unlock_irq() or it will enable IRQs prematurely. Fixes: a3667aaed569 ("[SCSI] csiostor: Chelsio FCoE offload driver") Link: https://lore.kernel.org/r/20191019085913.GA14245@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/csiostor/csio_lnode.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c index cc5611efc7a9..a8e29e3d3572 100644 --- a/drivers/scsi/csiostor/csio_lnode.c +++ b/drivers/scsi/csiostor/csio_lnode.c @@ -301,6 +301,7 @@ csio_ln_fdmi_rhba_cbfn(struct csio_hw *hw, struct csio_ioreq *fdmi_req) struct fc_fdmi_port_name *port_name; uint8_t buf[64]; uint8_t *fc4_type; + unsigned long flags; if (fdmi_req->wr_status != FW_SUCCESS) { csio_ln_dbg(ln, "WR error:%x in processing fdmi rhba cmd\n", @@ -385,13 +386,13 @@ csio_ln_fdmi_rhba_cbfn(struct csio_hw *hw, struct csio_ioreq *fdmi_req) len = (uint32_t)(pld - (uint8_t *)cmd); /* Submit FDMI RPA request */ - spin_lock_irq(&hw->lock); + spin_lock_irqsave(&hw->lock, flags); if (csio_ln_mgmt_submit_req(fdmi_req, csio_ln_fdmi_done, FCOE_CT, &fdmi_req->dma_buf, len)) { CSIO_INC_STATS(ln, n_fdmi_err); csio_ln_dbg(ln, "Failed to issue fdmi rpa req\n"); } - spin_unlock_irq(&hw->lock); + spin_unlock_irqrestore(&hw->lock, flags); } /* @@ -412,6 +413,7 @@ csio_ln_fdmi_dprt_cbfn(struct csio_hw *hw, struct csio_ioreq *fdmi_req) struct fc_fdmi_rpl *reg_pl; struct fs_fdmi_attrs *attrib_blk; uint8_t buf[64]; + unsigned long flags; if (fdmi_req->wr_status != FW_SUCCESS) { csio_ln_dbg(ln, "WR error:%x in processing fdmi dprt cmd\n", @@ -491,13 +493,13 @@ csio_ln_fdmi_dprt_cbfn(struct csio_hw *hw, struct csio_ioreq *fdmi_req) attrib_blk->numattrs = htonl(numattrs); /* Submit FDMI RHBA request */ - spin_lock_irq(&hw->lock); + spin_lock_irqsave(&hw->lock, flags); if (csio_ln_mgmt_submit_req(fdmi_req, csio_ln_fdmi_rhba_cbfn, FCOE_CT, &fdmi_req->dma_buf, len)) { CSIO_INC_STATS(ln, n_fdmi_err); csio_ln_dbg(ln, "Failed to issue fdmi rhba req\n"); } - spin_unlock_irq(&hw->lock); + spin_unlock_irqrestore(&hw->lock, flags); } /* @@ -512,6 +514,7 @@ csio_ln_fdmi_dhba_cbfn(struct csio_hw *hw, struct csio_ioreq *fdmi_req) void *cmd; struct fc_fdmi_port_name *port_name; uint32_t len; + unsigned long flags; if (fdmi_req->wr_status != FW_SUCCESS) { csio_ln_dbg(ln, "WR error:%x in processing fdmi dhba cmd\n", @@ -542,13 +545,13 @@ csio_ln_fdmi_dhba_cbfn(struct csio_hw *hw, struct csio_ioreq *fdmi_req) len += sizeof(*port_name); /* Submit FDMI request */ - spin_lock_irq(&hw->lock); + spin_lock_irqsave(&hw->lock, flags); if (csio_ln_mgmt_submit_req(fdmi_req, csio_ln_fdmi_dprt_cbfn, FCOE_CT, &fdmi_req->dma_buf, len)) { CSIO_INC_STATS(ln, n_fdmi_err); csio_ln_dbg(ln, "Failed to issue fdmi dprt req\n"); } - spin_unlock_irq(&hw->lock); + spin_unlock_irqrestore(&hw->lock, flags); } /** -- 2.20.1