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]
Date:	Mon, 20 Jan 2014 11:19:08 -0800
From:	Brian Norris <computersforpeace@...il.com>
To:	Eunbong Song <eunb.song@...sung.com>
Cc:	dwmw2@...radead.org, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: nand: make more readable panic_nand_wait_ready()
 and nand_wait_ready()

On Tue, Jan 07, 2014 at 11:19:56PM +0000, Eunbong Song wrote:
> 
> panic_nand_wait_ready() and nand_wait_ready() calls dev_ready() without checking if it exists.

There are many occasions where we call a function pointer without
(locally) checking that it is non-NULL. That is by design.

If you see a problem with this behavior, please fix this properly rather
than covering it up. This patch will just make faulty drivers spin for
20ms rather than hitting a bug. Instead, you should aim to fix buggy
drivers that call dev_ready() without assigning it; or even better,
defensively improve nand_base to detect those drivers which are
utilizing nand_command_lp() or nand_command() without assigning
dev_ready().

> This patch add check routine dev_ready() before run dev_ready()
> and this makes the code more readable

This patch does not make the code more readable, nor does it improve the
state of the original code much. Please solve and document a real
problem.

Thanks,
Brian
--
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