Subject: kern/34162: wrong MCLAIM in m_split0 ?
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
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
>Organization:
>Environment:
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
>Description:
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.
>How-To-Repeat:
code inspection.
>Fix:
s/m/n/