MTD concat layer

Brian J. Fox bfox at ua.com
Mon Feb 18 10:53:29 EST 2002


   From: David Woodhouse <dwmw2 at infradead.org>
   Cc: "Brian J. Fox" <bfox at ua.com>, linux-mtd at lists.infradead.org,
       J?rn Engel <joern at wohnheim.fh-wedel.de>
   Date: Mon, 18 Feb 2002 09:05:55 +0000
   Sender: David Woodhouse <dwmw2 at redhat.com>

   There is never any excuse for passing invalid offset/length to the
   erase function - even the ioctl code can do a sanity check before
   passing through the values provided by the user.

That's right.

   For errors which can understandably occur, your concerns are valid
   and we should ensure sanity by failing the request as safely as
   possible, doing nothing else.

   This is not such an error. As long as the ioctl() has an
   appropriate sanity check, the occurrence of such an error indicates
   that the kernel code is completely broken. Better to BUG()

BUG() is completely acceptable.  It allows the driver to be fixed.
It's also orthogonal to the original question.  Erasing blocks is
simply a way to guarantee that data has been irrevocably lost.

Brian
== The Difference Between Cultures: ==
    Einigkeit und Recht und Freiheit
    Liberte', E'galite', Fraternite'
    Sex, drugs and rock'n'roll




More information about the linux-mtd mailing list