aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_pr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_pr.c')
-rw-r--r--drivers/target/target_core_pr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 1e946502c37..956c84c6b66 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -1540,6 +1540,14 @@ static int core_scsi3_decode_spec_i_port(
1540 tidh_new->dest_local_nexus = 1; 1540 tidh_new->dest_local_nexus = 1;
1541 list_add_tail(&tidh_new->dest_list, &tid_dest_list); 1541 list_add_tail(&tidh_new->dest_list, &tid_dest_list);
1542 1542
1543 if (cmd->data_length < 28) {
1544 pr_warn("SPC-PR: Received PR OUT parameter list"
1545 " length too small: %u\n", cmd->data_length);
1546 cmd->scsi_sense_reason = TCM_INVALID_PARAMETER_LIST;
1547 ret = -EINVAL;
1548 goto out;
1549 }
1550
1543 buf = transport_kmap_data_sg(cmd); 1551 buf = transport_kmap_data_sg(cmd);
1544 /* 1552 /*
1545 * For a PERSISTENT RESERVE OUT specify initiator ports payload, 1553 * For a PERSISTENT RESERVE OUT specify initiator ports payload,