Date: Fri, 21 Aug 2009 14:42:00 -0400 From: Martin Karsten <mkarsten@cs.uwaterloo.ca> To: vwe@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/134355: [mbuf] comments for m_getm2 inconsistent with behaviour Message-ID: <4A8EEA78.3040708@cs.uwaterloo.ca> In-Reply-To: <200906172013.n5HKDL4S004576@freefall.freebsd.org> References: <200906172013.n5HKDL4S004576@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I must have missed this email. Yes, changing the comment is definitely enough to rectify the inconsistency. Thanks, Martin On 06/17/2009 04:13 PM, vwe@FreeBSD.org wrote: > Old Synopsis: [kernel] comments for m_getm2 inconsistent with behaviour > New Synopsis: [mbuf] comments for m_getm2 inconsistent with behaviour > > State-Changed-From-To: open->analyzed > State-Changed-By: vwe > State-Changed-When: Wed Jun 17 20:07:52 UTC 2009 > State-Changed-Why: > Martin, > thank you for your submission. > In the first place I thought you've found a code bug but while carefully > analyzing usage of m_getm2(), I haven't been able to to find a sign > of trouble. I agree current implementation isn't intentional and might > easily lead into misuse of m_getmw() but the function is rarely used. > I think the issue can be solved by "fixing" the leading comment by > something like the following. > > --- uipc_mbuf.c.orig 2009-06-17 22:03:53.000000000 +0200 > +++ uipc_mbuf.c 2009-06-17 22:06:24.000000000 +0200 > @@ -90,8 +90,9 @@ > * Allocate a given length worth of mbufs and/or clusters (whatever fits > * best) and return a pointer to the top of the allocated chain. If an > * existing mbuf chain is provided, then we will append the new chain > - * to the existing one but still return the top of the newly allocated > - * chain. > + * to the existing one but still return the top of the pre-existing > + * chain. If no pre-existing mbuf chain is given, we return the top > + * of the new allocated mbuf chain. > */ > struct mbuf * > m_getm2(struct mbuf *m, int len, int how, short type, int flags) > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=134355
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A8EEA78.3040708>