Date: Tue, 7 Jan 2020 16:49:50 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356448 - stable/12/sys/kern Message-ID: <202001071649.007GnoOW080693@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001071649.007GnoOW080693>