Submitted by: Juha-Matti Liukkonen, Cubical Solutions Ltd (jml@cubical.fi)
Reviewed by: hm Bug in i4btel driver read routine corrected. The conditions in the while() clause caused the receive queue to be referenced before checking if a channel is connected, leading to kernel panic (do a 'dd if=/dev/i4btel0 of=/dev/null' on an unconnected tel device, panic will follow). Correction was to reorder the while clause conditions to check for connectedness first.
This commit is contained in:
parent
13ab4e6dc1
commit
078aac9c09
@ -29,7 +29,7 @@
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
* last edit-date: [Fri Jan 12 14:52:05 2001]
|
||||
* last edit-date: [Tue May 8 10:19:36 2001]
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -533,9 +533,9 @@ i4btelread(dev_t dev, struct uio *uio, int ioflag)
|
||||
s = splimp();
|
||||
IF_LOCK(sc->isdn_linktab->rx_queue);
|
||||
|
||||
while(IF_QEMPTY(sc->isdn_linktab->rx_queue) &&
|
||||
(sc->devstate & ST_ISOPEN) &&
|
||||
(sc->devstate & ST_CONNECTED))
|
||||
while((sc->devstate & ST_ISOPEN) &&
|
||||
(sc->devstate & ST_CONNECTED) &&
|
||||
IF_QEMPTY(sc->isdn_linktab->rx_queue))
|
||||
{
|
||||
sc->devstate |= ST_RDWAITDATA;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user