From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796453921; b=vLrsEUVS2OWona/+xFk+R7URyMb5lwYIUAttTjRhge48u3l/PdQvgIm8gTvTN1R0gDAi wSGmHdjcFgIWFZE4DKw7sRk/h2N9+k1jgHvWvp71ObVIoGU6pFUc4D4XFe4VnHYbujkeL UkJBlfVs8GbSWqW9zUJBjWx4Dl5iAGjSXqF9Vck2O1Ai3GwPL17/c/rEyfwm/wcjNhbVI x02q+dLIBbYiD2Jtsk/58kbxch3vMX1HhrLBsGzmShjsvO3Pe3M9zUMTeIFDih3CL2CUE 5Zg3+t1XQnRBiVYMf9OeIWe763ZgCPH75TtWSvGpZ06z537NjLDbi4XRSPd3k2hVPvQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796453921; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=pAxbCIyuAi7YG4ZYr+c77StFOSvLOC8Ig3H2VnaKR/I=; b=MoC5Ou807QI8ci81a6MZGR4/VpACm3B2DARHpHTJv7602BUuB1iUUOxpsVkqAVQoISCm 5NMC4zJIBh+xSx1JYLnVEttle0CcGoX4Bcc7ksOVCnG4erQ2JYCy01ooiosrytbiTd2GM Qt6xf2ZdI0ZJ1Hf/UYgahQn09J1XhCMozMReWl6v/5dJsSAdGbu69QfjAdZ5khvBM5vpt tbCuWwasp/6rvJtshVC/4dEWNUoSBdQPHfQe353a/hC/CdzAoDY0PIKouhf/2qyPW99lf GeI5UUA+lVQ3g6QJE5aIU0B4OWnu8ul4qEhs1s7nxAapbHZGuprt83ehEN8gbm4gu6A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d13VMSxI; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5BAD606A322 for ; Sat, 5 Dec 2026 06:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d13VMSxI Received: by smtp.kernel.org (Postfix) with ESMTPSA id 666C21F00A07; Sat, 5 Dec 2026 06:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796453921; bh=pAxbCIyuAi7YG4ZYr+c77StFOSvLOC8Ig3H2VnaKR/I=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=d13VMSxIX362impD2hMSReLxOlntQGogOhpUVQQV9uJed6erC3/jp8Y3WcDPW3vjs jtJeTLa+6iTtbMjk0ouEO197lnuWiDd3MvuE+j9kakrKgmlXR4seTSb+UGwTwDT39q Ru2RuZWJ0Yf530nQPRxuOa0uRNkiskY2z2hChZ9R+gvHG/6XxOHVLRPBFszrkTsDh6 hpRGzCFaln75yRjr9wEm0rUn8qgzOZp5fGJWjcF9o/UgrMMmSB+wyyFlj5oa/ZcsyT 0CL9D8BbMhTomqF2e8YLBhSwBigOJYoa0SoDc/d9Hjh5o6t4s/jHl+1NhaiBvLWNST wTDyPV9y2NpwA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 8/9] scsi: qla2xxx: Hold qp_lock when completing command in abort timeout Reply-To: sashiko-reviews@lists.linux.dev To: "Praneeth Balasubramanian" Cc: linux-scsi@vger.kernel.org In-Reply-To: <20261205063229.2518424-9-praneethb2002@gmail.com> References: <20261205063229.2518424-1-praneethb2002@gmail.com> <20261205063229.2518424-9-praneethb2002@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 06:58:41 +0000 X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] scsi: qla2xxx: inaccurate EDIF-only scope in commit log and comment -- commit da3577a69cb0da6d84ce149ab6bf41f706152379 Author: Praneeth Balasubramanian scsi: qla2xxx: Hold qp_lock when completing command in abort timeout This commit moves sp->cmd_sp->done() inside the qpair->qp_lock_ptr critical section in qla24xx_abort_iocb_timeout(). > The unlocked qla_put_buf() can race qla_get_buf() on the same qpair. The > pool accounting is then updated non-atomically, and qla_trim_buf() can > dma_pool_free() a buffer that qla_get_buf() has just handed to a new > EDIF command, which is then submitted using the freed buffer. This > affects the EDIF buffer pool only and needs a firmware abort timeout to > trigger. [ ... ] > diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_i= nit.c > index ccb039d97353b..3d80ead06aa1e 100644 > --- a/drivers/scsi/qla2xxx/qla_init.c > +++ b/drivers/scsi/qla2xxx/qla_init.c > @@ -139,15 +139,17 @@ static void qla24xx_abort_iocb_timeout(void *data) > break; > } > } > - spin_unlock_irqrestore(qpair->qp_lock_ptr, flags); > - > if (cmdsp_found && sp->cmd_sp) { > /* > * This done function should take care of > * original command ref: INIT > + * > + * The completion path ends in qla_put_buf(), which > + * must run under qp_lock. > */ > sp->cmd_sp->done(sp->cmd_sp, QLA_OS_TIMER_EXPIRED); > } > + spin_unlock_irqrestore(qpair->qp_lock_ptr, flags); [Severity: Low] Are the commit message and new comment accurate in stating that qp_lock_ptr is only needed for EDIF's qla_put_buf()? qla_put_buf() was introduced three years after 71c80b75ce8f ("scsi: qla2xxx: Do command completion on abort timeout") in 82d8dfd2a238 ("scsi: qla2xxx: edif: Fix performance dip due to lock contention"). Non-EDIF completions also depend on qp_lock_ptr: qla2x00_sp_free_dma() and qla2xxx_qpair_sp_free_dma() update sp->qpair->dsd_list, dsd_inuse, and dsd_avail when SRB_FCP_CMND_DMA_VALID is set, and qla_nvme_sp_done() expects the qpair lock to be held. The Fixes: tag fits the underlying unlocked sp->cmd_sp->done() call, so updating the changelog and comment to reflect the broader qpair-locked completion contract would keep them consistent. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205063229.2518= 424-1-praneethb2002@gmail.com?part=3D8