diff options
author | rik <rik@FreeBSD.org> | 2005-07-09 14:03:02 +0000 |
---|---|---|
committer | rik <rik@FreeBSD.org> | 2005-07-09 14:03:02 +0000 |
commit | 452b8fd2eef793136b4a3b5e49e44d38794ffe8e (patch) | |
tree | 62d2350480485b6065e4bc5a8b1b15c00bc4db76 /sys/dev | |
parent | f03d3eb58cdc293249a6a2dc1db70c9f79379768 (diff) | |
download | FreeBSD-src-452b8fd2eef793136b4a3b5e49e44d38794ffe8e.zip FreeBSD-src-452b8fd2eef793136b4a3b5e49e44d38794ffe8e.tar.gz |
Protect from partially initialized channels.
Approved by: re (scottl)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cp/if_cp.c | 2 | ||||
-rw-r--r-- | sys/dev/ctau/if_ct.c | 2 | ||||
-rw-r--r-- | sys/dev/cx/if_cx.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index 79131ad..bd18f25 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -326,6 +326,8 @@ static void cp_intr (void *arg) for (i = 0; i < NCHAN && b->chan[i].type; i++) { drv_t *d = b->chan[i].sys; struct mbuf *m; + if (!d || !d->running) + continue; while (_IF_QLEN(&d->queue)) { IF_DEQUEUE (&d->queue,m); if (!m) diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index e103377..f026a9f 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -287,6 +287,8 @@ static void ct_intr (void *arg) for (i = 0; i < NCHAN && b->chan[i].type; i++) { drv_t *d = b->chan[i].sys; struct mbuf *m; + if (!d || !d->running) + continue; while (_IF_QLEN(&d->queue)) { IF_DEQUEUE (&d->queue,m); if (!m) diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 350d653..bf458a9 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -374,6 +374,8 @@ static void cx_intr (void *arg) for (i = 0; i < NCHAN && b->chan[i].type; i++) { drv_t *d = b->chan[i].sys; struct mbuf *m; + if (!d || !d->running) + continue; while (_IF_QLEN(&d->queue)) { IF_DEQUEUE (&d->queue,m); if (!m) |