summaryrefslogtreecommitdiffstats
path: root/sys/i4b
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2001-05-21 09:24:48 +0000
committerhm <hm@FreeBSD.org>2001-05-21 09:24:48 +0000
commit39cf58d369279eaf1d11a706f174fdb98fb245e8 (patch)
tree50a138469c2f31692107f5798e4fa928d0a0512c /sys/i4b
parentc65c10ec83e1ab12358a1571f7f75953c4dfe8ee (diff)
downloadFreeBSD-src-39cf58d369279eaf1d11a706f174fdb98fb245e8.zip
FreeBSD-src-39cf58d369279eaf1d11a706f174fdb98fb245e8.tar.gz
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.
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 48ddb55..2b6115b 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;
OpenPOWER on IntegriCloud