diff options
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index ef16f7ca4bb1..4c0a59afd5c8 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -299,9 +299,10 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
299 | } | 299 | } |
300 | 300 | ||
301 | /* log additional information provided by FSF (if any) */ | 301 | /* log additional information provided by FSF (if any) */ |
302 | if (unlikely(qtcb->header.log_length)) { | 302 | if (likely(qtcb->header.log_length)) { |
303 | /* do not trust them ;-) */ | 303 | /* do not trust them ;-) */ |
304 | if (qtcb->header.log_start > sizeof(struct fsf_qtcb)) { | 304 | if (unlikely(qtcb->header.log_start > |
305 | sizeof(struct fsf_qtcb))) { | ||
305 | ZFCP_LOG_NORMAL | 306 | ZFCP_LOG_NORMAL |
306 | ("bug: ULP (FSF logging) log data starts " | 307 | ("bug: ULP (FSF logging) log data starts " |
307 | "beyond end of packet header. Ignored. " | 308 | "beyond end of packet header. Ignored. " |
@@ -310,8 +311,9 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
310 | sizeof(struct fsf_qtcb)); | 311 | sizeof(struct fsf_qtcb)); |
311 | goto forget_log; | 312 | goto forget_log; |
312 | } | 313 | } |
313 | if ((size_t) (qtcb->header.log_start + qtcb->header.log_length) | 314 | if (unlikely((size_t) (qtcb->header.log_start + |
314 | > sizeof(struct fsf_qtcb)) { | 315 | qtcb->header.log_length) > |
316 | sizeof(struct fsf_qtcb))) { | ||
315 | ZFCP_LOG_NORMAL("bug: ULP (FSF logging) log data ends " | 317 | ZFCP_LOG_NORMAL("bug: ULP (FSF logging) log data ends " |
316 | "beyond end of packet header. Ignored. " | 318 | "beyond end of packet header. Ignored. " |
317 | "(start=%i, length=%i, size=%li)\n", | 319 | "(start=%i, length=%i, size=%li)\n", |