Subject: CVS commit: src/sys/sys
To: None <source-changes@netbsd.org>
From: Steve Woodford <scw@netbsd.org>
List: source-changes
Date: 04/17/2003 16:15:36
Module Name:	src
Committed By:	scw
Date:		Thu Apr 17 16:15:36 UTC 2003

Modified Files:
	src/sys/sys: mbuf.h

Log Message:
Fix a problem first reported by Simon Burge when paddr_t is 64-bits on an
ILP32 platform.

What happens is that the compiler inserts padding in struct mbuf between the
MH_pkthdr and MH_dat members, due to the paddr_t in struct _m_ext.

Unfortunately, the old MLEN/MHLEN macroes fail to take into account this
padding and, thus, wind up making sizeof(struct mbuf) > MSIZE. This causes
mbuf corruption, which eventually leads to all sorts of bogosity on ILP32
platforms with a 64-bit paddr_t.

Thanks to simonb@ and fvdl@ for helping to track down this bug.


To generate a diff of this commit:
cvs rdiff -r1.81 -r1.82 src/sys/sys/mbuf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.