Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-microblaze.git] / drivers / scsi / libfc / fc_rport.c
index e400783..1e1c0f1 100644 (file)
@@ -1161,8 +1161,10 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
        op = fc_frame_payload_op(fp);
        if (op == ELS_LS_ACC) {
                pp = fc_frame_payload_get(fp, sizeof(*pp));
-               if (!pp)
+               if (!pp) {
+                       fc_rport_error_retry(rdata, -FC_EX_SEQ_ERR);
                        goto out;
+               }
 
                resp_code = (pp->spp.spp_flags & FC_SPP_RESP_MASK);
                FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x spp_type 0x%x\n",
@@ -1175,8 +1177,10 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
                                fc_rport_error_retry(rdata, -FC_EX_SEQ_ERR);
                        goto out;
                }
-               if (pp->prli.prli_spp_len < sizeof(pp->spp))
+               if (pp->prli.prli_spp_len < sizeof(pp->spp)) {
+                       fc_rport_error_retry(rdata, -FC_EX_SEQ_ERR);
                        goto out;
+               }
 
                fcp_parm = ntohl(pp->spp.spp_params);
                if (fcp_parm & FCP_SPPF_RETRY)