lkml.org 
[lkml]   [2019]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Potential NULL pointer deference in scsi: scsi_transport_spi
From
Date
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

> , however, the return value shost is not
> checked and get used. This could potentially be unsafe.
>

\
 
 \ /
  Last update: 2019-10-07 22:54    [W:0.047 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site