Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-0]: src/sys/kern Pull up following revision(s) (requested by ma...
details: https://anonhg.NetBSD.org/src/rev/cc67317db787
branches: netbsd-7-0
changeset: 801491:cc67317db787
user: martin <martin%NetBSD.org@localhost>
date: Tue May 22 17:38:05 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1606):
sys/kern/uipc_mbuf.c: revision 1.214
Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.
In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.
diffstat:
sys/kern/uipc_mbuf.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diffs (30 lines):
diff -r 408406b78b19 -r cc67317db787 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c Tue May 15 04:48:16 2018 +0000
+++ b/sys/kern/uipc_mbuf.c Tue May 22 17:38:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.158.4.1.2.3 2018/05/15 04:48:16 martin Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.158.4.1.2.4 2018/05/22 17:38:05 martin 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.158.4.1.2.3 2018/05/15 04:48:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.158.4.1.2.4 2018/05/22 17:38:05 martin Exp $");
#include "opt_mbuftrace.h"
#include "opt_nmbclusters.h"
@@ -458,11 +458,6 @@
{
KASSERT(m->m_flags & M_PKTHDR);
- if (M_READONLY(m)) {
- /* Nothing we can do. */
- return;
- }
-
m_tag_delete_chain(m, NULL);
m->m_flags &= ~M_PKTHDR;
memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr));
Home |
Main Index |
Thread Index |
Old Index