Re: Potential NULL pointer deference in scsi: scsi_transport_spi

2019-10-07 Thread James Bottomley
On Mon, 2019-10-07 at 13:30 -0700, Yizhuo Zhai wrote: > Hi All: > > drivers/scsi/scsi_transport_spi.c: > > Inside function store_spi_transport_period(), dev_to_shost() > could return NULL No, it can't. The device model ensures that a SCSI target or device must be parented to a host. James > ,

Potential NULL pointer deference in scsi

2019-10-07 Thread Yizhuo Zhai
Hi All: drivers/scsi/scsi.c: Inside function __starget_for_each_device(), dev_to_shost() could return NULL,however, the return value shost is not checked and get used. This could potentially be unsafe. -- Kind Regards, Yizhuo Zhai Computer Science, Graduate Student University of California, R

Potential NULL pointer deference in scsi: scsi_transport_spi

2019-10-07 Thread Yizhuo Zhai
Hi All: drivers/scsi/scsi_transport_spi.c: Inside function store_spi_transport_period(), dev_to_shost() could return NULL, however, the return value shost is not checked and get used. This could potentially be unsafe. -- Kind Regards, Yizhuo Zhai Computer Science, Graduate Student University