From 28d7601989fb5cd72c4ab71eec7ea3145db3ba93 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Wed, 6 Nov 2019 22:40:19 +0000 Subject: [PATCH] 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. MFC after: 3 weeks Sponsored by: Netflix --- sys/kern/uipc_mbuf2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c index 36c39ef34fb..40aa45d3cfb 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -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 */