[SCSI] Fix range check in scsi_host_dif_capable()
The range checking from fe542396 was bad. We would still end up walking beyond the array as Type 3 is defined to be 4 in the protection bitmask. Instead use ARRAY_SIZE() for the range check. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
Showing
想要评论请 注册 或 登录