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: <20210104141932.1037f8e3@xps13>
Date:   Mon, 4 Jan 2021 14:19:32 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc:     vadivel.muruganx.ramuthevar@...ux.intel.com,
        linux-mtd@...ts.infradead.org, richard@....at, vigneshr@...com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: rawnand: intel: remove broken code

Hi Martin,

Martin Blumenstingl <martin.blumenstingl@...glemail.com> wrote on Mon,
4 Jan 2021 14:13:04 +0100:

> Hi Miquel,
> 
> thank you for looking into this
> 
> On Mon, Jan 4, 2021 at 9:48 AM Miquel Raynal <miquel.raynal@...tlin.com> wrote:
> [...]
> > >       nand_set_flash_node(&ebu_host->chip, dev->of_node);
> > > -     if (!mtd->name) {
> > > -             dev_err(ebu_host->dev, "NAND label property is mandatory\n");
> > > -             return -EINVAL;
> > > -     }  
> >
> > This is valid code, it's best to use a label = "my-storage"; property
> > in your NAND DT node. Then mtd->name will be updated by
> > nand_set_flash_node().  
> so you suggest moving the check instead?
> the original code flow was:
>   mtd = NULL;
>   if (!mtd->name)
>      return -EINVAL;
>   mtd = nand_to_mtd(&ebu_host->chip);
>   ...
> 
> by saying that the code itself is valid you're asking me to update the
> flow to the following:
>   mtd = nand_to_mtd(&ebu_host->chip);
>   if (!mtd->name)
>      return -EINVAL;

I actually missed the fact that mtd was used initialized, but yes that
is exactly what I meant!

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ