summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_wb.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-12-05 02:21:44 +0000
committerwpaul <wpaul@FreeBSD.org>1998-12-05 02:21:44 +0000
commitf72fa84f9303d83d38279ea0ca986be9cf5a47b2 (patch)
tree0abdc409e63b6d3111833f2d1477f54d712bb151 /sys/pci/if_wb.c
parentad9bd899c9e5b7048ee2ff9a5c9943d40dd4a0a4 (diff)
downloadFreeBSD-src-f72fa84f9303d83d38279ea0ca986be9cf5a47b2.zip
FreeBSD-src-f72fa84f9303d83d38279ea0ca986be9cf5a47b2.tar.gz
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.
Diffstat (limited to 'sys/pci/if_wb.c')
-rw-r--r--sys/pci/if_wb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c
index 41fc318..027365d 100644
--- a/sys/pci/if_wb.c
+++ b/sys/pci/if_wb.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_wb.c,v 1.30 1998/11/29 06:45:16 wpaul Exp $
+ * $Id: if_wb.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $
*/
/*
@@ -121,7 +121,7 @@
#ifndef lint
static char rcsid[] =
- "$Id: if_wb.c,v 1.30 1998/11/29 06:45:16 wpaul Exp $";
+ "$Id: if_wb.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $";
#endif
/*
@@ -1752,6 +1752,12 @@ static void wb_start(ifp)
}
/*
+ * If there are no packets 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
OpenPOWER on IntegriCloud