mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
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.
This commit is contained in:
parent
cc56928232
commit
f5c444e19e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41526
@ -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
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
@ -2027,6 +2027,12 @@ static void mx_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
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
@ -1490,6 +1490,12 @@ static void pn_start(ifp)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
@ -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
|
||||
@ -2439,6 +2439,12 @@ static void tl_start(ifp)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
@ -1751,6 +1751,12 @@ static void wb_start(ifp)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
@ -2260,6 +2260,12 @@ static void xl_start(ifp)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user