summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/dev/vr/if_vr.c10
-rw-r--r--sys/pci/if_mx.c10
-rw-r--r--sys/pci/if_pn.c10
-rw-r--r--sys/pci/if_tl.c10
-rw-r--r--sys/pci/if_vr.c10
-rw-r--r--sys/pci/if_wb.c10
-rw-r--r--sys/pci/if_xl.c10
7 files changed, 56 insertions, 14 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index a5a2fc4..a96d14c 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
/*
@@ -1627,6 +1627,12 @@ static void vr_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
diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c
index 6ea96aa..8f43a5d 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
diff --git a/sys/pci/if_pn.c b/sys/pci/if_pn.c
index efee8d1..a9796f8 100644
--- a/sys/pci/if_pn.c
+++ b/sys/pci/if_pn.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_pn.c,v 1.32 1998/11/29 06:40:07 wpaul Exp $
+ * $Id: if_pn.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $
*/
/*
@@ -95,7 +95,7 @@
#ifndef lint
static char rcsid[] =
- "$Id: if_pn.c,v 1.32 1998/11/29 06:40:07 wpaul Exp $";
+ "$Id: if_pn.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $";
#endif
/*
@@ -1491,6 +1491,12 @@ static void pn_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
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c
index 2df5676..840fe85 100644
--- a/sys/pci/if_tl.c
+++ b/sys/pci/if_tl.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_tl.c,v 1.18 1998/10/08 15:45:36 wpaul Exp $
+ * $Id: if_tl.c,v 1.19 1998/10/31 17:23:48 wpaul Exp $
*/
/*
@@ -218,7 +218,7 @@
#ifndef lint
static char rcsid[] =
- "$Id: if_tl.c,v 1.18 1998/10/08 15:45:36 wpaul Exp $";
+ "$Id: if_tl.c,v 1.19 1998/10/31 17:23:48 wpaul Exp $";
#endif
#ifdef TL_DEBUG
@@ -2440,6 +2440,12 @@ static void tl_start(ifp)
}
/*
+ * If there are no packets queued, bail.
+ */
+ if (cur_tx == NULL)
+ return;
+
+ /*
* That's all we can stands, we can't stands no more.
* If there are no other transfers pending, then issue the
* TX GO command to the adapter to start things moving.
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index a5a2fc4..a96d14c 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/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
/*
@@ -1627,6 +1627,12 @@ static void vr_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
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
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 8fbd6df..a3bbf22 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.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_xl.c,v 1.16 1998/10/22 16:46:26 wpaul Exp $
+ * $Id: if_xl.c,v 1.17 1998/11/18 16:46:53 wpaul Exp $
*/
/*
@@ -147,7 +147,7 @@
#ifndef lint
static char rcsid[] =
- "$Id: if_xl.c,v 1.16 1998/10/22 16:46:26 wpaul Exp $";
+ "$Id: if_xl.c,v 1.17 1998/11/18 16:46:53 wpaul Exp $";
#endif
/*
@@ -2261,6 +2261,12 @@ static void xl_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