Message ID | 5360fa20-74bc-4c22-a78e-ea8b18c5410d@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-22609-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp982817dyi; Wed, 10 Jan 2024 10:42:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcsuYVnwCXAOiuHar9+fov0+SlHyCrilDb9T+jl6D1vmHe4LDNLCTtQLXILMaCENsUyMcR X-Received: by 2002:ac8:594d:0:b0:429:b161:8a7 with SMTP id 13-20020ac8594d000000b00429b16108a7mr1786436qtz.132.1704912142850; Wed, 10 Jan 2024 10:42:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704912142; cv=none; d=google.com; s=arc-20160816; b=vAEsaPk+quR/ZurCTx8mJVXyiY80cWeb2BIF3FryMnyGx8o+HPSgC75xNLh47dP82K KqhzyIhaJO4EI4az1PcN+811tY9jLq3KYN86NLK2qEq1vUG0qZ620ymYfBiYJHb2WuNq BzBB+Nj+Il7E2pGqrC2QnjH1RPks7ex8eqG44XQwmCimgs2i3xn13Zr72gLOKlk3GYJ7 WrSr2F7f6pz3dezeFuocAfi4IysNdheB628aliXVRcRvkKemeDzulwNi3jsZCSNyPAkK xgvkRDoQ6CMoB/sCaR9aXGIfpP0QqzUZmHYJMKLsXDsxA/DSutvcHj7YlcqmBaftPjWP vrgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=l3HxkPxdBK1lXd88gyjH7DsIkkBoMbuVmr437RwfE1I=; fh=ZWEDmruO17vvkbvKiplZaQvip3GorSl6fUfwvrJvYIo=; b=eFppYhWfzu1ox7zNmdeancDk35v1umsN+Hyb/wGLNKYgq5YYuxDvTk/jEBXGs7b3h7 EHGBPW5AVVsnT6dkwk+KV0D6KBpiQmvuGs0ndyMkoHS94S+Ipgwr73vVVC3O/4y4Jz9J uKfMS74n/vXBG30DhcYVCtpVwFo2UoCatzhhDNrtNM+yIDmpCzwp4t8DyGwZCPbYFLWR ygCInVqfJJ/FiD3gk8q/lNAGs11MyWqnkitNT4b8R5/SqgxHWJ4voqlrXAOt5uSl6fBR +LmvFJFavzEPgfMVLA1ev+rkvGKHa1v64y11q41MkdypkMzi0VMjhc1TobLr3jOS3j7E ocow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FmQ7WIj2; spf=pass (google.com: domain of linux-kernel+bounces-22609-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22609-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q9-20020a05622a030900b0042973b1f666si4631559qtw.390.2024.01.10.10.42.22 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 10:42:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22609-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FmQ7WIj2; spf=pass (google.com: domain of linux-kernel+bounces-22609-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22609-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A1F471C224CE for <ouuuleilei@gmail.com>; Wed, 10 Jan 2024 18:42:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 319F84D5B7; Wed, 10 Jan 2024 18:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FmQ7WIj2" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED0C04D582 for <linux-kernel@vger.kernel.org>; Wed, 10 Jan 2024 18:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40d5336986cso58065945e9.1 for <linux-kernel@vger.kernel.org>; Wed, 10 Jan 2024 10:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704912119; x=1705516919; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=l3HxkPxdBK1lXd88gyjH7DsIkkBoMbuVmr437RwfE1I=; b=FmQ7WIj2Qb/it2bvlvsFv23+BrZxrEavTAm9V7+geJw/r1oN+vzQTFXPD5B5iKcR8k sdm/HLpaWdJBfXIB64u1ECAWu5DqhjFOsjqKiul05tal/0C3s7OG7mJwvROCcvOGXbP/ PbuftZU1sIUdtgN+iYz+CHv76GfvF1MOwJwthCCvX/U2dkSaSiwbehTKBZWJSffuc+y5 DftTx640Bl15uewmFBh9ZdsXIHPjJsw0nLoOHsonvENtvOjPIanANqeAVdi14fArPoiy 9OEVRkdqa45FrybwzsJ1u5JJm3pTroGA+vly/uSus4bcTG01JsDHmW45XK5LunM4OIeG PBYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704912119; x=1705516919; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l3HxkPxdBK1lXd88gyjH7DsIkkBoMbuVmr437RwfE1I=; b=MF/5KQceflDdr2WwBpqRqJNV08lXi/OlUhO8Ro3ZRITcpdVWmLfL2Q5Qi1khddGJ9E NO4kLEaU7IMqPbNv/ea8u/3FCUjFLlErrvrDdr431Wioyl4YexfkCXIxB3RfhS6K83Sn YJfKiDFpp7h7xhRqrsCYAzrBR+cCLPUssrmsVLeY95cLWr5WZyt4dyOa1Xhv8Rzf1qUe 0eYBul/+rz7GajRndaST/VhFTXJm34u0UM9E3TsIwtsU18CTuxZnSnJqSFMWcY7Ryydk +axwvYc7g9fh2EPsmn2FO5mOL5ywsMoPvT3oKbJ4ZdCo8vLwscn2c5fSCmwzd5AzwO56 rGhQ== X-Gm-Message-State: AOJu0YxrFpgULrOCqbyQ8TOYoKACUt/ur34qny4cdUM4HjO2Q1hHFxlM XcQgxI8dx+UAHErguPjw/mDJb3d6by9sMw== X-Received: by 2002:a05:600c:4e8f:b0:40e:4b48:57d4 with SMTP id f15-20020a05600c4e8f00b0040e4b4857d4mr689256wmq.180.1704912119155; Wed, 10 Jan 2024 10:41:59 -0800 (PST) Received: from localhost ([102.140.209.237]) by smtp.gmail.com with ESMTPSA id n40-20020a05600c3ba800b0040e541ddcb1sm3081607wms.33.2024.01.10.10.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 10:41:59 -0800 (PST) Date: Wed, 10 Jan 2024 21:41:55 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Karan Tilak Kumar <kartilak@cisco.com> Cc: Satish Kharat <satishkh@cisco.com>, Sesidhar Baddela <sebaddel@cisco.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Arulprabhu Ponnusamy <arulponn@cisco.com>, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] scsi: fnic: unlock on error path in fnic_queuecommand() Message-ID: <5360fa20-74bc-4c22-a78e-ea8b18c5410d@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787729954742668042 X-GMAIL-MSGID: 1787729954742668042 |
Series |
scsi: fnic: unlock on error path in fnic_queuecommand()
|
|
Commit Message
Dan Carpenter
Jan. 10, 2024, 6:41 p.m. UTC
Call spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags) before
returning.
Fixes: c81df08cd294 ("scsi: fnic: Add support for multiqueue (MQ) in fnic driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/scsi/fnic/fnic_scsi.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Wednesday, January 10, 2024 10:42 AM, Dan Carpenter <dan.carpenter@linaro.org> wrote: > > Call spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags) before > returning. > > Fixes: c81df08cd294 ("scsi: fnic: Add support for multiqueue (MQ) in fnic driver") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- > drivers/scsi/fnic/fnic_scsi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c > index 4d6db4509e75..8d7fc5284293 100644 > --- a/drivers/scsi/fnic/fnic_scsi.c > +++ b/drivers/scsi/fnic/fnic_scsi.c > @@ -546,6 +546,7 @@ int fnic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc) > if (fnic->sw_copy_wq[hwq].io_req_table[blk_mq_unique_tag_to_tag(mqtag)] != NULL) { > WARN(1, "fnic<%d>: %s: hwq: %d tag 0x%x already exists\n", > fnic->fnic_num, __func__, hwq, blk_mq_unique_tag_to_tag(mqtag)); > + spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags); > return SCSI_MLQUEUE_HOST_BUSY; > } > > -- > 2.42.0 > > Thanks for your change, Dan. Looks good to me. Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com> Regards, Karan
Dan, > Call spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags) before > returning. Applied to 6.8/scsi-staging, thanks!
On Wed, 10 Jan 2024 21:41:55 +0300, Dan Carpenter wrote: > Call spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags) before > returning. > > Applied to 6.8/scsi-queue, thanks! [1/1] scsi: fnic: unlock on error path in fnic_queuecommand() https://git.kernel.org/mkp/scsi/c/38945c2b006b
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 4d6db4509e75..8d7fc5284293 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -546,6 +546,7 @@ int fnic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc) if (fnic->sw_copy_wq[hwq].io_req_table[blk_mq_unique_tag_to_tag(mqtag)] != NULL) { WARN(1, "fnic<%d>: %s: hwq: %d tag 0x%x already exists\n", fnic->fnic_num, __func__, hwq, blk_mq_unique_tag_to_tag(mqtag)); + spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags); return SCSI_MLQUEUE_HOST_BUSY; }