From owner-cvs-src@FreeBSD.ORG Mon Sep 26 20:58:13 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C7B516A41F; Mon, 26 Sep 2005 20:58:13 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60CFA43D73; Mon, 26 Sep 2005 20:58:11 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.200] ([10.0.0.200]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j8QKw96j028500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Sep 2005 13:58:10 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <433860D1.5000200@errno.com> Date: Mon, 26 Sep 2005 13:57:53 -0700 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050918) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andre Oppermann References: <200509262035.j8QKZj04022444@repoman.freebsd.org> <43385C89.60009@errno.com> <43385F03.B0BDA733@freebsd.org> In-Reply-To: <43385F03.B0BDA733@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netipsec ipsec_mbuf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 20:58:13 -0000 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