lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Fix for possible null pointer dereference
> -	ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK;
> + if (mpi_reply) {
> + ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK;
> + }
>
> if (ioc_status != MPI2_IOCSTATUS_SUCCESS)
> ioc->port_enable_failed = 1;

ioc_status isn't initialized without the reply and used here as well
as later in the function. I think we'll need input from LSI or others
with the spec on what to do when we didn't get a reply.



\
 
 \ /
  Last update: 2014-05-28 14:01    [W:0.081 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site