linux-next: manual merge of the scsi-mkp tree with the scsi-fixes tree

From: Mark Brown

Date: Thu Oct 15 2026 - 12:00:38 EST


Hi all,

Today's linux-next merge of the scsi-mkp tree got a conflict in:

drivers/scsi/libiscsi.c

between commits:

c5958c770b2a0 ("scsi: libiscsi: Validate the ITT reflected in a Reject PDU")
11bffcd9cb346 ("scsi: libiscsi: Validate the task named by a management response")

from the scsi-fixes tree and commit:

ae1c0d65bc711 ("scsi: libiscsi: Pass the session pointer directly to several functions")

from the scsi-mkp tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/scsi/libiscsi.c
index 2ab55d1e66529,34d4125417db0..0000000000000
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@@ -1136,22 -1159,21 +1159,23 @@@ static int iscsi_handle_reject(struct i
* Just resend.
*/
/* In RX path we are under back lock */
- spin_unlock(&conn->session->back_lock);
- spin_lock(&conn->session->frwd_lock);
+ spin_unlock(&session->back_lock);
+ spin_lock(&session->frwd_lock);
iscsi_send_nopout(conn,
(struct iscsi_nopin*)&rejected_pdu);
- spin_unlock(&conn->session->frwd_lock);
- spin_lock(&conn->session->back_lock);
+ spin_unlock(&session->frwd_lock);
+ spin_lock(&session->back_lock);
} else {
- struct iscsi_task *task;
+ struct iscsi_task *task = NULL;
/*
* Our nop as ping got dropped. We know the target
* and transport are ok so just clean up
*/
- task = iscsi_itt_to_task(session, conn,
- rejected_pdu.itt);
- if (!task) {
+ if (!iscsi_verify_itt(conn, rejected_pdu.itt))
- task = iscsi_itt_to_task(conn, rejected_pdu.itt);
++ task = iscsi_itt_to_task(session, conn,
++ rejected_pdu.itt);
+ if (!task || task->state == ISCSI_TASK_FREE ||
+ task->sc) {
iscsi_conn_printk(KERN_ERR, conn,
"Invalid pdu reject. Could "
"not lookup rejected task.\n");
@@@ -1286,8 -1311,8 +1313,8 @@@ int __iscsi_complete_pdu(struct iscsi_s
case ISCSI_OP_TEXT_RSP:
case ISCSI_OP_SCSI_TMFUNC_RSP:
case ISCSI_OP_NOOP_IN:
- task = iscsi_itt_to_task(conn, hdr->itt);
+ task = iscsi_itt_to_task(session, conn, hdr->itt);
- if (!task)
+ if (!task || task->state == ISCSI_TASK_FREE || task->sc)
return ISCSI_ERR_BAD_ITT;
break;
default:

Attachment: signature.asc
Description: PGP signature