The combined tag size in this case is 6 bytes; fix the loop. Signed-off-by: Andreas Gruenbacher <andreas.gruenbacher@xxxxxxxxx> --- drivers/scsi/sd_dif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c index a7a691d..d657a8c 100644 --- a/drivers/scsi/sd_dif.c +++ b/drivers/scsi/sd_dif.c @@ -264,7 +264,7 @@ static void sd_dif_type3_get_tag(void *prot, void *tag_buf, unsigned int sectors u8 *tag = tag_buf; unsigned int i, j; - for (i = 0, j = 0 ; i < sectors ; i++, j += 2, sdt++) { + for (i = 0, j = 0 ; i < sectors ; i++, j += 6, sdt++) { tag[j] = (sdt->app_tag & 0xff00) >> 8; tag[j+1] = sdt->app_tag & 0xff; tag[j+2] = (sdt->ref_tag & 0xff000000) >> 24; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html