aboutsummaryrefslogtreecommitdiff
path: root/sys/i4b
diff options
context:
space:
mode:
authorHellmuth Michaelis <hm@FreeBSD.org>2001-05-21 09:24:48 +0000
committerHellmuth Michaelis <hm@FreeBSD.org>2001-05-21 09:24:48 +0000
commit078aac9c098bab4f250ca2f1ab67e6fe6501f476 (patch)
treea317648c1b3d049bc6aa31c275092c6bb4f13195 /sys/i4b
parent13ab4e6dc1049dd0c2187938cb0509b3002a1e4d (diff)
downloadsrc-078aac9c098bab4f250ca2f1ab67e6fe6501f476.tar.gz
src-078aac9c098bab4f250ca2f1ab67e6fe6501f476.zip
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.
Notes
Notes: svn path=/head/; revision=76923
Diffstat (limited to 'sys/i4b')
-rw-r--r--sys/i4b/driver/i4b_tel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c
index 48ddb55fa5a6..2b6115befe90 100644
--- a/sys/i4b/driver/i4b_tel.c
+++ b/sys/i4b/driver/i4b_tel.c
@@ -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;