Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1304018

Re: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error handling function

From James Bottomley <James.Bottomley@HansenPartnership.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error handling function
Date 2016-01-08 00:50 +0100
Message-ID <qOstA-6LL-9@gated-at.bofh.it> (permalink)
References <qOrQS-6ud-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error handling function "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-08 00:10 +0100
  Re: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error  handling function James Bottomley <James.Bottomley@HansenPartnership.com> - 2016-01-08 00:50 +0100
    RE: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error  handling function KY Srinivasan <kys@microsoft.com> - 2016-01-08 20:00 +0100
      Re: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error  handling function James Bottomley <James.Bottomley@HansenPartnership.com> - 2016-01-08 20:30 +0100
        RE: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error  handling function KY Srinivasan <kys@microsoft.com> - 2016-01-08 21:20 +0100
          Re: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error  handling function James Bottomley <James.Bottomley@HansenPartnership.com> - 2016-01-08 21:30 +0100
            RE: [PATCH 1/1] scsi: scsi_transport_fc: Fix a bug in the error  handling function KY Srinivasan <kys@microsoft.com> - 2016-01-08 22:40 +0100

csiph-web