Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753676AbcJMKte convert rfc822-to-8bit (ORCPT ); Thu, 13 Oct 2016 06:49:34 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52408 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751972AbcJMKt0 (ORCPT ); Thu, 13 Oct 2016 06:49:26 -0400 Subject: Re: [patch] zfcp: spin_lock_irqsave() is not nestable To: Dan Carpenter , linux-scsi@vger.kernel.org, "James E . J . Bottomley" , "Martin K . Petersen" References: <20161013085358.GH16198@mwanda> Cc: Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, =?UTF-8?Q?Hendrik_Br=c3=bcckner?= , Gerald Schaefer From: Steffen Maier Date: Thu, 13 Oct 2016 12:49:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161013085358.GH16198@mwanda> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8BIT X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101310-0008-0000-0000-000002DE8DB9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101310-0009-0000-0000-00001A5260EE Message-Id: <409dfaed-85eb-01ba-539d-df95f008a6bf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-13_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610130186 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1732 Lines: 50 Dan, many thanks for catching this! Sparse did not notice, is there other tooling that would find such things? James, Martin, could you please queue this as fix for one of my patches that went into the 4.9 merge window, so for 4.9-rc I guess? https://lkml.kernel.org/r/20161013085358.GH16198@mwanda or https://lkml.org/lkml/2016/10/13/94 On 10/13/2016 10:53 AM, Dan Carpenter wrote: > We accidentally overwrite the original saved value of "flags" so that > we can't re-enable IRQs at the end of the function. Presumably this > function is mostly called with IRQs disabled or it would be obvious in > testing. > > Fixes: aceeffbb59bb ("zfcp: trace full payload of all SAN records (req,resp,iels)") Cc: #2.6.38+ > Signed-off-by: Dan Carpenter Signed-off-by: Steffen Maier > > diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c > index 637cf89..5810019 100644 > --- a/drivers/s390/scsi/zfcp_dbf.c > +++ b/drivers/s390/scsi/zfcp_dbf.c > @@ -384,7 +384,7 @@ void zfcp_dbf_san(char *tag, struct zfcp_dbf *dbf, > /* if (len > rec_len): > * dump data up to cap_len ignoring small duplicate in rec->payload > */ > - spin_lock_irqsave(&dbf->pay_lock, flags); > + spin_lock(&dbf->pay_lock); > memset(payload, 0, sizeof(*payload)); > memcpy(payload->area, paytag, ZFCP_DBF_TAG_LEN); > payload->fsf_req_id = req_id; > -- Mit freundlichen Gr??en / Kind regards Steffen Maier Linux on z Systems Development IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschaeftsfuehrung: Dirk Wittkopp Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294