]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: fnic: Fix crash in fnic_wq_cmpl_handler when FDMI times out
authorKaran Tilak Kumar <kartilak@cisco.com>
Wed, 18 Jun 2025 00:34:28 +0000 (17:34 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Jun 2025 03:06:27 +0000 (23:06 -0400)
commita35b29bdedb4d2ae3160d4d6684a6f1ecd9ca7c2
treea4c832c7b508e51e26e0e967022e7dc6223fff08
parent2e083cd802294693a5414e4557a183dd7e442e71
scsi: fnic: Fix crash in fnic_wq_cmpl_handler when FDMI times out

When both the RHBA and RPA FDMI requests time out, fnic reuses a frame to
send ABTS for each of them. On send completion, this causes an attempt to
free the same frame twice that leads to a crash.

Fix crash by allocating separate frames for RHBA and RPA, and modify ABTS
logic accordingly.

Tested by checking MDS for FDMI information.

Tested by using instrumented driver to:

 - Drop PLOGI response
 - Drop RHBA response
 - Drop RPA response
 - Drop RHBA and RPA response
 - Drop PLOGI response + ABTS response
 - Drop RHBA response + ABTS response
 - Drop RPA response + ABTS response
 - Drop RHBA and RPA response + ABTS response for both of them

Fixes: 09c1e6ab4ab2 ("scsi: fnic: Add and integrate support for FDMI")
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Tested-by: Arun Easi <aeasi@cisco.com>
Co-developed-by: Arun Easi <aeasi@cisco.com>
Signed-off-by: Arun Easi <aeasi@cisco.com>
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Cc: stable@vger.kernel.org
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://lore.kernel.org/r/20250618003431.6314-1-kartilak@cisco.com
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/fnic/fdls_disc.c
drivers/scsi/fnic/fnic.h
drivers/scsi/fnic/fnic_fdls.h