Re: [PATCH 4/7][SCSI] mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sreekanth Reddy <Sreekanth.Reddy@xxxxxxx> writes:

> Infinite loop can occur if IOCStatus is not equal to
> MPI2_IOCSTATUS_CONFIG_INVALID_PAGE value in the while loops in functions 
> _scsih_search_responding_sas_devices,
> _scsih_search_responding_raid_devices and
> _scsih_search_responding_expanders
>
> So, Instead of checking for MPI2_IOCSTATUS_CONFIG_INVALID_PAGE value,
> in this patch code is modified to check for IOCStatus not equals to 
> MPI2_IOCSTATUS_SUCCESS to break the while loop.
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c |   16 ++++------------
>  1 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 9ebc9dc..632eba7 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -6406,7 +6406,7 @@ _scsih_search_responding_sas_devices(struct MPT3SAS_ADAPTER *ioc)
>  	    handle))) {
>  		ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
>  		    MPI2_IOCSTATUS_MASK;
> -		if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE)
> +		if (ioc_status != MPI2_IOCSTATUS_SUCCESS)
>  			break;
>  		handle = le16_to_cpu(sas_device_pg0.DevHandle);
>  		device_info = le32_to_cpu(sas_device_pg0.DeviceInfo);

Doesn't the same apply to the code mpt2sas driver you copied this code
from?



Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux