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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 10 May 2016 08:58:21 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Amit Pundir <amit.pundir@...aro.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	Ken Sumrall <ksumrall@...roid.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Shawn Lin <shawn.lin@...k-chips.com>,
	Jon Hunter <jonathanh@...dia.com>,
	Grant Grundler <grundler@...omium.org>,
	Luca Porzio <lporzio@...ron.com>,
	Android Kernel Team <kernel-team@...roid.com>,
	Sumit Semwal <sumit.semwal@...aro.org>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH] mmc: block: improve logging of handling emmc timeouts

On 4 May 2016 at 11:13, Amit Pundir <amit.pundir@...aro.org> wrote:
> From: Ken Sumrall <ksumrall@...roid.com>
>
> Add some logging to make it clear just how the emmc timeout
> was handled.
>
> Cc: Ulf Hansson <ulf.hansson@...aro.org>
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Shawn Lin <shawn.lin@...k-chips.com>
> Cc: Jon Hunter <jonathanh@...dia.com>
> Cc: Grant Grundler <grundler@...omium.org>
> Cc: Luca Porzio <lporzio@...ron.com>
> Cc: Android Kernel Team <kernel-team@...roid.com>
> Cc: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: John Stultz <john.stultz@...aro.org>

I would prefer if you could remove the above cc:s, as I don't think
it's of relevance to have all these people here.

> Signed-off-by: Ken Sumrall <ksumrall@...roid.com>
> [AmitP: cherry-picked this Android patch from aosp common kernel android-4.4]
> Signed-off-by: Amit Pundir <amit.pundir@...aro.org>
> ---
>  drivers/mmc/card/block.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 9c69e21..e737c81 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -948,18 +948,25 @@ static int mmc_blk_cmd_error(struct request *req, const char *name, int error,
>                         req->rq_disk->disk_name, "timed out", name, status);
>
>                 /* If the status cmd initially failed, retry the r/w cmd */
> -               if (!status_valid)
> +               if (!status_valid) {
> +                       pr_err("%s: status not valid, retrying timeout\n",
> +                               req->rq_disk->disk_name);
>                         return ERR_RETRY;
> +               }
>
>                 /*
>                  * If it was a r/w cmd crc error, or illegal command
>                  * (eg, issued in wrong state) then retry - we should
>                  * have corrected the state problem above.
>                  */
> -               if (status & (R1_COM_CRC_ERROR | R1_ILLEGAL_COMMAND))
> +               if (status & (R1_COM_CRC_ERROR | R1_ILLEGAL_COMMAND)) {
> +                       pr_err("%s: command error, retrying timeout\n",
> +                               req->rq_disk->disk_name);
>                         return ERR_RETRY;
> +               }
>
>                 /* Otherwise abort the command */
> +               pr_err("%s: not retrying timeout\n", req->rq_disk->disk_name);

There's already a print done a couple of lines above. Even if it's not
telling about the "re-try" it becomes implicit, as nothing else gets
printed in this path.

Would you mind removing this?

>                 return ERR_ABORT;
>
>         default:
> --
> 2.7.4
>

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ