All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "K. Y. Srinivasan" <kys@microsoft.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, ohering@suse.com,
	jbottomley@parallels.com, hch@infradead.org,
	linux-scsi@vger.kernel.org, apw@canonical.com,
	vkuznets@redhat.com, jasowang@redhat.com,
	martin.petersen@oracle.com, hare@suse.de
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error handling function
Date: Thu, 07 Jan 2016 15:48:31 -0800	[thread overview]
Message-ID: <1452210511.15259.38.camel@HansenPartnership.com> (raw)
In-Reply-To: <1452213645-18889-1-git-send-email-kys@microsoft.com>

On Thu, 2016-01-07 at 16:40 -0800, K. Y. Srinivasan wrote:
> The macro startget_to_rport() can return NULL; handle that case
> properly.

OK, can we unwind why you think you could possibly need this?  It would
mean that fc_timed_out was called for a non-FC device, which was
thought to be an impossibility when the fc transport class was
designed.

James

> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Cc: <stable@vger.kernel.org>
> ---
>  drivers/scsi/scsi_transport_fc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_transport_fc.c
> b/drivers/scsi/scsi_transport_fc.c
> index 24eaaf6..42a908f 100644
> --- a/drivers/scsi/scsi_transport_fc.c
> +++ b/drivers/scsi/scsi_transport_fc.c
> @@ -2081,7 +2081,7 @@ fc_timed_out(struct scsi_cmnd *scmd)
>  {
>  	struct fc_rport *rport = starget_to_rport(scsi_target(scmd
> ->device));
>  
> -	if (rport->port_state == FC_PORTSTATE_BLOCKED)
> +	if ((rport == NULL) || (rport->port_state ==
> FC_PORTSTATE_BLOCKED))
>  		return BLK_EH_RESET_TIMER;
>  
>  	return BLK_EH_NOT_HANDLED;

  reply	other threads:[~2016-01-07 23:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08  0:40 [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error handling function K. Y. Srinivasan
2016-01-08  0:40 ` K. Y. Srinivasan
2016-01-07 23:48 ` James Bottomley [this message]
2016-01-08 18:58   ` KY Srinivasan
2016-01-08 19:20     ` James Bottomley
2016-01-08 20:12       ` KY Srinivasan
2016-01-08 20:26         ` James Bottomley
2016-01-08 21:35           ` KY Srinivasan

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=1452210511.15259.38.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=jbottomley@parallels.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ohering@suse.com \
    --cc=stable@vger.kernel.org \
    --cc=vkuznets@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.