Re: [PATCH 2/3] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

2013-04-27 Thread Akinobu Mita
2013/4/25 Martin K. Petersen martin.peter...@oracle.com: Akinobu == Akinobu Mita akinobu.m...@gmail.com writes: Akinobu The protection info dif_storep is allocated only when parameter Akinobu dif is not zero. But it will be accessed when reading or Akinobu writing to the storage installed

Re: [PATCH 2/3] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

2013-04-24 Thread Martin K. Petersen
Akinobu == Akinobu Mita akinobu.m...@gmail.com writes: Akinobu The protection info dif_storep is allocated only when parameter Akinobu dif is not zero. But it will be accessed when reading or Akinobu writing to the storage installed with parameter dix is not Akinobu zero. Akinobu So kernel

[PATCH 2/3] scsi_debug: fix NULL pointer dereference with parameters dif=0 dix=1

2013-04-21 Thread Akinobu Mita
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