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]
Date:	Thu, 2 Apr 2015 12:02:24 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	Richard Weinberger <richard@....at>
Cc:	Brian Norris <computersforpeace@...il.com>,
	"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mtd: Add simple read disturb test

On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger <richard@....at> wrote:

> +               ret = mtdtest_erase_eraseblock(mtd, i);
> +               if (ret) {
> +                       err = ret;
> +                       goto out;
> +               }

Why not just do like this instead?

              err = mtdtest_erase_eraseblock(mtd, i);
              if (err)
                 goto out;

> +
> +               ret = mtdtest_write(mtd, i * mtd->erasesize, mtd->erasesize,
> +                                   iobuf_orig);
> +               if (ret) {
> +                       err = ret;
> +                       goto out;
> +               }

Same here.

> +               ret = mtdtest_relax();
> +               if (ret)
> +                       goto out;

Here you propagate the wrong error. You test for 'ret' and propagate 'err'.
--
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