lkml.org 
[lkml]   [1996]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectunbounded looping on hardware bits considered harmful

Hello,

I'd like to suggest that code that can wait forever for a hardware bit to
change is a bad idea, _especially_ if it is likely to be called during
autoprobing of a device driver. For example:

while (!(tmp = NCR5380_read(STATUS_REG)) & SR_REQ);

This example is in the generic NCR5380 driver, but such code is all
over the Linux kernel. This or something nearby is called during
auto-probing. In my test case the autoprobe routine got a
false-positive, no NCR5380 is present, and the kernel hangs forever.
One could argue that the auto-probing routine is incorrect and we
should never get this far, however it would be nice if the failure of
a single hardware device did not bring down the entire kernel.

Thanks

Bruce Perens
--
Bruce Perens K6BP Bruce@Pixar.com
Finger bruce@master.Debian.org for PGP public key.
PGP fingerprint = 88 6A 15 D0 65 D4 A3 A6 1F 89 6A 76 95 24 87 B3

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.024 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site