diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-24 11:00:09 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-24 11:00:09 +0000 |
commit | 21634b35aa28d2c631f3edd95a04e6ded91f41c2 (patch) | |
tree | a4ff1c60873e7539a74fdb3601611f1dc72894bd | |
parent | dabb90d9842a60d2079308f9b86f73da851cf364 (diff) |
If the copied tag head is empty, initialize it properly. This (along
with the kern/uipc_mbuf.c commit) should solve the NFS crashes.
-rw-r--r-- | sys/sys/mbuf.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 405ef81dc8e..24143ffa603 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mbuf.h,v 1.30 2001/05/21 05:53:38 angelos Exp $ */ +/* $OpenBSD: mbuf.h,v 1.31 2001/05/24 11:00:08 angelos Exp $ */ /* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */ /* @@ -403,6 +403,8 @@ void _sk_mclget(struct mbuf *, int); */ #define M_COPY_HDR(to, from) { \ (to)->m_pkthdr = (from)->m_pkthdr; \ + if (TAILQ_EMPTY(&(from)->m_pkthdr.tags)) \ + TAILQ_INIT(&(to)->m_pkthdr.tags); \ } /* @@ -410,8 +412,8 @@ void _sk_mclget(struct mbuf *, int); */ #define M_DUP_HDR(to, from) { \ M_COPY_HDR((to), (from)); \ - TAILQ_INIT(&(to)->m_pkthdr.tags); \ m_tag_copy_chain((to), (from)); \ + TAILQ_INIT(&(from)->m_pkthdr.tags); \ } /* |