svn commit: r356448 - stable/12/sys/kern

Bjoern A. Zeeb bz at FreeBSD.org
Tue Jan 7 16:49:50 UTC 2020


Author: bz
Date: Tue Jan  7 16:49:50 2020
New Revision: 356448
URL: https://svnweb.freebsd.org/changeset/base/356448

Log:
  MFC r354416:
  
    m_pulldown(): Change an if () panic() into a KASSERT().
  
    If we pass in a NULL mbuf to m_pulldown() we are in a bad situation
    already.  There is no point in doing that check for production code.
    Change the if () panic() into a KASSERT.

Modified:
  stable/12/sys/kern/uipc_mbuf2.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/uipc_mbuf2.c
==============================================================================
--- stable/12/sys/kern/uipc_mbuf2.c	Tue Jan  7 16:47:25 2020	(r356447)
+++ stable/12/sys/kern/uipc_mbuf2.c	Tue Jan  7 16:49:50 2020	(r356448)
@@ -101,8 +101,8 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp
 	int writable;
 
 	/* check invalid arguments. */
-	if (m == NULL)
-		panic("m == NULL in m_pulldown()");
+	KASSERT(m != NULL, ("%s: fix caller: m is NULL off %d len %d offp %p\n",
+	    __func__, off, len, offp));
 	if (len > MCLBYTES) {
 		m_freem(m);
 		return NULL;	/* impossible */


More information about the svn-src-all mailing list