Subject: kern/34162: wrong MCLAIM in m_split0 ?
To: None <,,>
From: Pavel Cahyna <>
List: netbsd-bugs
Date: 08/08/2006 15:05:01
>Number:         34162
>Category:       kern
>Synopsis:       wrong MCLAIM in m_split0 ?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 08 15:05:01 +0000 2006
>Originator:     Pavel Cahyna
>Release:        NetBSD 2.0 and -current
System: NetBSD beta 3.0_RC5 NetBSD 3.0_RC5 (EV56) #3: Mon Dec 12 20:28:20 CET 2005 pavel@beta:/usr/src/sys/arch/alpha/compile/EV56 alpha
Architecture: alpha
Machine: alpha
In sys/kern/uipc_mbuf.c, function m_split0, there is
		MGETHDR(n, wait, m0->m_type);
		if (n == 0)
			return (NULL);
		MCLAIM(m, m0->m_owner);

shouldn't it be MCLAIM(n, ...) ? In most cases MCLAIM is used on the
mbuf we just allocated.
code inspection.