From: Wolfgang Denk Date: Fri, 13 Aug 2010 16:04:55 +0200 Subject: [U-Boot] [PATCH 2/3] Connect the AT91 UDC to USB CDC-ethernet support In-Reply-To: References: <1281634613-2707-1-git-send-email-linux@bohmer.net> <1281634613-2707-2-git-send-email-linux@bohmer.net> <4C644411.6030608@emk-elektronik.de> <20100812205602.46E911536EF@gemini.denx.de> <20100813102254.AA52F154736@gemini.denx.de> Message-ID: <20100813140455.E71A81536EF@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Remy Bohmer, In message you wrote: > > >> > So broken that you cannot get back to the command line interpreter? > >> > Really? > >> > >> If malloc is broken, I consider that reason enough for hang/reboot... > > > > That's not a good idea. =A0Please fix. > > Fix what? > If runtime a condition is detected that should _never_ _ever_ happen > (like malloc does not work properly for some reason), which would even > make Linux OOPS or panic may not result in a hang() on U-boot? malloc() is not broken, it just has not enough resources to fulfil your request. That does not mean that the rest of the system (which does not make any such requests) would not be able to continue. > In that case I can remove the hang() and consider if it never > happened. Maybe even the code will reach the prompt, but there will be > no guarantees... Fail the running command with appropriate error message and returen code, but do not decide for the user if he is able and willing to continue. > I personally consider that worse compared to tell the user that > something serious has gone wrong... Of course we have to issue appropriate error messages and return codes, but there is no need to halt the system. You stop your car, but you don't (usually) take it to a knacker's yard when there is a flat tire. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Respect is a rational process -- McCoy, "The Galileo Seven", stardate 2822.3