lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD+HZHWtvfc1YBM+FdVt1vV8rjkk7GVmX9-NRWXjh=1U4Ez+dg@mail.gmail.com>
Date:	Mon, 17 Aug 2015 15:28:22 +0200
From:	Jack Wang <xjtuwjp@...il.com>
To:	Johannes Thumshirn <jthumshirn@...e.de>
Cc:	lindar_liu <lindar_liu@...sh.com>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	"pmchba@...s.com" <pmchba@...s.com>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pm80xx: Don't override ts->stat on IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY

2015-08-17 15:04 GMT+02:00 Johannes Thumshirn <jthumshirn@...e.de>:
> In case XXX returns with a status of IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY
> ts->stat gets set to SAS_OPEN_REJECT but a missing 'break' statement causes a
> fallthrough to the default handler of the switch statement overriding ts->stat
> to SAS_DEV_NO_RESPONSE.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>

Thanks, please feel free to add:
Acked-by: Jack Wang <jinpu.wang@...fitbricks.com>

> ---
>  drivers/scsi/pm8001/pm8001_hwi.c | 1 +
>  drivers/scsi/pm8001/pm80xx_hwi.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index 96dcc09..d0feec5 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -2642,6 +2642,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
>                 ts->resp = SAS_TASK_COMPLETE;
>                 ts->stat = SAS_OPEN_REJECT;
>                 ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
> +               break;
>         default:
>                 PM8001_IO_DBG(pm8001_ha,
>                         pm8001_printk("Unknown status 0x%x\n", status));
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 05cce46..18d4ac4 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -2314,6 +2314,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
>                 ts->resp = SAS_TASK_COMPLETE;
>                 ts->stat = SAS_OPEN_REJECT;
>                 ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
> +               break;
>         default:
>                 PM8001_IO_DBG(pm8001_ha,
>                         pm8001_printk("Unknown status 0x%x\n", status));
> --
> 2.5.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ