From f5c444e19ebc6c852fb05f33086b8d3494a3b465 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Sat, 5 Dec 1998 02:21:44 +0000 Subject: Add sanity check to foo_start() routines: in the unlikely (though apparently possible) event that the transmit start routine is called with and empty if_snd queue, bail out instead of dereferencing unilitialized transmit list pointers and panicking. --- sys/dev/vr/if_vr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index a5a2fc4ab3d4..a96d14ce11c2 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_vr.c,v 1.13 1998/12/01 22:08:11 wpaul Exp $ + * $Id: if_vr.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $ */ /* @@ -97,7 +97,7 @@ #ifndef lint static char rcsid[] = - "$Id: if_vr.c,v 1.13 1998/12/01 22:08:11 wpaul Exp $"; + "$Id: if_vr.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $"; #endif /* @@ -1626,6 +1626,12 @@ static void vr_start(ifp) #endif } + /* + * If there are no frames queued, bail. + */ + if (cur_tx == NULL) + return; + /* * Place the request for the upload interrupt * in the last descriptor in the chain. This way, if -- cgit v1.3