Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2005 13:57:53 -0700
From:      Sam Leffler <sam@errno.com>
To:        Andre Oppermann <andre@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/netipsec ipsec_mbuf.c
Message-ID:  <433860D1.5000200@errno.com>
In-Reply-To: <43385F03.B0BDA733@freebsd.org>
References:  <200509262035.j8QKZj04022444@repoman.freebsd.org> <43385C89.60009@errno.com> <43385F03.B0BDA733@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Andre Oppermann wrote:
> Sam Leffler wrote:
> 
>>Andre Oppermann wrote:
>>
>>>andre       2005-09-26 20:35:45 UTC
>>>
>>>  FreeBSD src repository
>>>
>>>  Modified files:
>>>    sys/netipsec         ipsec_mbuf.c
>>>  Log:
>>>  Replace custom mbuf writeability test with generic M_WRITABLE() test
>>>  covering all edge cases too.
>>
>>I vaguely recall that M_WRITEABLE did exist when I wrote that code but
>>it did not do the right thing.  I'm not sure why you needed to make this
>>change but beware of unexpected side effects.
> 
> 
> The test in question tries to determine whether to copy the mbuf to make
> to safe for modification.  The old did not respect the M_RDONLY for example.
> M_WRITABLE() correctly tests for all cases.
> 

And as I said; I did it for a reason that I cannot recall now.  I'm 
certain that it was pre-mbufs-over-uma so maybe this is now safe but 
such are the ways that subtle bugs are introduced into code...

	Sam




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?433860D1.5000200>