[SCSI] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1
[SCSI] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

The protection info dif_storep is allocated only when parameter dif is
not zero.  But it will be accessed when reading or writing to the storage
installed with parameter dix is not zero.

So kernel crashes if scsi_debug module is loaded with parameters dix=1 and
dif=0.

This fixes it by making dif_storep available if parameter dix is not zero
instead of checking if parameter dif is not zero.

Signed-off-by: Akinobu Mita <3807cf899f217da549814bf6c330d3b6e6819ccf@gmail.com>
Acked-by: Douglas Gilbert <54dff2264884c355ed5584a3b7f1530b4b26921e@interlog.com>
Acked-by: "Martin K. Petersen" <0384aaef27f06874adbdb09a807bb339f4aff9fd@oracle.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs