public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: jejb@kernel.org, JBottomley@Parallels.com,
	linux-scsi@vger.kernel.org, stable@vger.kernel.org,
	Sathya.Prakash@lsi.com, Nagalakshmi.Nandigama@lsi.com
Subject: Re: [PATCH 4/7][SCSI] mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned
Date: Fri, 28 Jun 2013 18:11:02 +0200	[thread overview]
Message-ID: <87sj02z04p.fsf@nemi.mork.no> (raw)
In-Reply-To: <20130628222302.GA5055@lsi.com> (Sreekanth Reddy's message of "Sat, 29 Jun 2013 03:53:02 +0530")

Sreekanth Reddy <Sreekanth.Reddy@lsi.com> 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@lsi.com>
> Cc: stable@vger.kernel.org
> ---
>  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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2013-06-28 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 22:23 [PATCH 4/7][SCSI] mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned Sreekanth Reddy
2013-06-28 16:11 ` Bjørn Mork [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj02z04p.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=JBottomley@Parallels.com \
    --cc=Nagalakshmi.Nandigama@lsi.com \
    --cc=Sathya.Prakash@lsi.com \
    --cc=Sreekanth.Reddy@lsi.com \
    --cc=jejb@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox