diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 442a6c1d5efcca8d099a35642bb967cdd9d94312..42bcf7f3a0f90bf5a8778e21cfe0b5c20f6e6a87 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -939,6 +939,9 @@ static struct fc_exch *fc_exch_find(struct fc_exch_mgr *mp, u16 xid) struct fc_exch *ep = NULL; u16 cpu = xid & fc_cpu_mask; + if (xid == FC_XID_UNKNOWN) + return NULL; + if (cpu >= nr_cpu_ids || !cpu_possible(cpu)) { pr_err("host%u: lport %6.6x: xid %d invalid CPU %d\n:", lport->host->host_no, lport->port_id, xid, cpu);