diff options
author | Bill Paul <wpaul@FreeBSD.org> | 1998-12-05 02:21:44 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 1998-12-05 02:21:44 +0000 |
commit | f5c444e19ebc6c852fb05f33086b8d3494a3b465 (patch) | |
tree | 5826eabe6447ac4086d57b85ff553c41019f2ac0 /sys/pci/if_mx.c | |
parent | cc56928232659b0fb9d0948f42c07f519bc6b4a8 (diff) | |
download | src-f5c444e19ebc6c852fb05f33086b8d3494a3b465.tar.gz src-f5c444e19ebc6c852fb05f33086b8d3494a3b465.zip |
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.
Notes
Notes:
svn path=/head/; revision=41526
Diffstat (limited to 'sys/pci/if_mx.c')
-rw-r--r-- | sys/pci/if_mx.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c index 6ea96aa71b96..8f43a5d075a2 100644 --- a/sys/pci/if_mx.c +++ b/sys/pci/if_mx.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_mx.c,v 1.28 1998/12/04 21:34:33 wpaul Exp $ + * $Id: if_mx.c,v 1.2 1998/12/04 21:48:12 wpaul Exp $ */ /* @@ -94,7 +94,7 @@ #ifndef lint static char rcsid[] = - "$Id: if_mx.c,v 1.28 1998/12/04 21:34:33 wpaul Exp $"; + "$Id: if_mx.c,v 1.2 1998/12/04 21:48:12 wpaul Exp $"; #endif /* @@ -2028,6 +2028,12 @@ static void mx_start(ifp) } /* + * 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 * we're chaining several packets at once, we'll only |