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] [day] [month] [year] [list]
Message-ID: <CAPcyv4jvoo2Ez5hMivt+-B3-9giX3v6VZ0xZWLBQzL=7spVnrg@mail.gmail.com>
Date:   Wed, 30 Oct 2019 13:25:47 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Qian Cai <cai@....pw>
Cc:     Vishal L Verma <vishal.l.verma@...el.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Keith Busch <keith.busch@...el.com>,
        "Weiny, Ira" <ira.weiny@...el.com>,
        linux-nvdimm <linux-nvdimm@...ts.01.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvdimm/btt: fix variable 'rc' set but not used

On Wed, Oct 30, 2019 at 12:16 PM Qian Cai <cai@....pw> wrote:
>
> drivers/nvdimm/btt.c: In function 'btt_read_pg':
> drivers/nvdimm/btt.c:1264:8: warning: variable 'rc' set but not used
> [-Wunused-but-set-variable]
>     int rc;
>         ^~
>
> Add a ratelimited message in case a storm of errors is encountered.
>
> Fixes: d9b83c756953 ("libnvdimm, btt: rework error clearing")
> Signed-off-by: Qian Cai <cai@....pw>
> ---
>  drivers/nvdimm/btt.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> index 3e9f45aec8d1..59852f7e2d60 100644
> --- a/drivers/nvdimm/btt.c
> +++ b/drivers/nvdimm/btt.c
> @@ -1266,6 +1266,11 @@ static int btt_read_pg(struct btt *btt, struct bio_integrity_payload *bip,
>                         /* Media error - set the e_flag */
>                         rc = btt_map_write(arena, premap, postmap, 0, 1,
>                                 NVDIMM_IO_ATOMIC);
> +
> +                       if (rc)
> +                               dev_warn_ratelimited(to_dev(arena),
> +                                       "Error persistently tracking bad blocks\n");

If the driver is going to warn about bad blocks it should at least
include the block address that is returning an error.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ