Module Name: src
Committed By: christos
Date: Mon Jan 9 14:25:52 UTC 2017
Modified Files:
src/sys/kern: uipc_mbuf.c
Log Message:
If we had an error, don't do the debug checks because they will most certainly
fail and we'll panic.
To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/kern/uipc_mbuf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.169 src/sys/kern/uipc_mbuf.c:1.170
--- src/sys/kern/uipc_mbuf.c:1.169 Tue Oct 4 10:13:21 2016
+++ src/sys/kern/uipc_mbuf.c Mon Jan 9 09:25:52 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.169 2016/10/04 14:13:21 christos Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.170 2017/01/09 14:25:52 christos Exp $ */
/*-
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.169 2016/10/04 14:13:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.170 2017/01/09 14:25:52 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -1328,6 +1328,9 @@ m_makewritable(struct mbuf **mp, int off
error = m_copyback0(mp, off, len, NULL,
M_COPYBACK0_PRESERVE|M_COPYBACK0_COW, how);
+ if (error)
+ return error;
+
#if defined(DEBUG)
int reslen = 0;
for (struct mbuf *n = *mp; n; n = n->m_next)
@@ -1338,7 +1341,7 @@ m_makewritable(struct mbuf **mp, int off
panic("m_makewritable: inconsist");
#endif /* defined(DEBUG) */
- return error;
+ return 0;
}
/*