From patchwork Fri Apr 24 11:18:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6268841 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2FCFABF4A6 for ; Fri, 24 Apr 2015 11:19:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E2CB2022A for ; Fri, 24 Apr 2015 11:19:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CBFD2026F for ; Fri, 24 Apr 2015 11:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967105AbbDXLTI (ORCPT ); Fri, 24 Apr 2015 07:19:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58926 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966336AbbDXLSx (ORCPT ); Fri, 24 Apr 2015 07:18:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 62DA2ADC9; Fri, 24 Apr 2015 11:18:45 +0000 (UTC) From: Hannes Reinecke To: James Bottomley Cc: Christoph Hellwig , Ondrey Zary , Doug Gilberg , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH 21/23] advansys: use spin_lock_irqsave() in interrupt handler Date: Fri, 24 Apr 2015 13:18:40 +0200 Message-Id: <1429874322-85488-23-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1429874322-85488-1-git-send-email-hare@suse.de> References: <1429874322-85488-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We should be using spin_lock_irqsave() when within the interrupt handler. Signed-off-by: Hannes Reinecke --- drivers/scsi/advansys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 485eaf0..7142a79 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -7242,9 +7242,10 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id) struct Scsi_Host *shost = dev_id; struct asc_board *boardp = shost_priv(shost); irqreturn_t result = IRQ_NONE; + unsigned long flags; ASC_DBG(2, "boardp 0x%p\n", boardp); - spin_lock(shost->host_lock); + spin_lock_irqsave(shost->host_lock, flags); if (ASC_NARROW_BOARD(boardp)) { if (AscIsIntPending(shost->io_port)) { result = IRQ_HANDLED; @@ -7259,7 +7260,7 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id) ASC_STATS(shost, interrupt); } } - spin_unlock(shost->host_lock); + spin_unlock_irqrestore(shost->host_lock, flags); ASC_DBG(1, "end\n"); return result;