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: <CAPcyv4isyZ8GVw0ggu54+CD09WgGwB38gtw5jM1AWsE8KC_q3Q@mail.gmail.com>
Date:   Fri, 2 Dec 2016 11:59:22 -0800
From:   Dan Williams <dan.j.williams@...el.com>
To:     Fabian Frederick <fabf@...net.be>
Cc:     "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/8 linux-next] libnvdimm: remove else after return in nsio_rw_bytes()

On Fri, Dec 2, 2016 at 11:21 AM, Fabian Frederick <fabf@...net.be> wrote:
> else after return is not needed.
>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
>  drivers/nvdimm/claim.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
> index d5dc80c..c0c113e 100644
> --- a/drivers/nvdimm/claim.c
> +++ b/drivers/nvdimm/claim.c
> @@ -238,11 +238,10 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
>                 if (unlikely(is_bad_pmem(&nsio->bb, offset / 512, sz_align)))
>                         return -EIO;
>                 return memcpy_from_pmem(buf, nsio->addr + offset, size);
> -       } else {
> -               memcpy_to_pmem(nsio->addr + offset, buf, size);
> -               nvdimm_flush(to_nd_region(ndns->dev.parent));
>         }
>
> +       memcpy_to_pmem(nsio->addr + offset, buf, size);
> +       nvdimm_flush(to_nd_region(ndns->dev.parent));
>         return 0;
>  }

Looks good, but this collides with

commit 82bf1037f2cab2d6960a08ae08513f2c3c0b335a
Author: Dave Jiang <dave.jiang@...el.com>
Date:   Fri Nov 11 12:37:36 2016 -0700

    libnvdimm: check and clear poison before writing to pmem

    We need to clear any poison when we are writing to pmem. The granularity
    will be sector size. If it's less then we can't do anything about it
    barring corruption.

    Signed-off-by: Dave Jiang <dave.jiang@...el.com>
    Reviewed-by: Vishal Verma <vishal.l.verma@...el.com>
    [djbw: fixup 0-length write request to succeed]
    Signed-off-by: Dan Williams <dan.j.williams@...el.com>

Can you respin this on top of libnvdimm-pending?

https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/log/?h=libnvdimm-pending

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ