From owner-cvs-all@FreeBSD.ORG Mon Sep 26 20:50:11 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 362EF16A41F for ; Mon, 26 Sep 2005 20:50:11 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB55843D58 for ; Mon, 26 Sep 2005 20:50:09 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 65956 invoked from network); 26 Sep 2005 20:23:09 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 26 Sep 2005 20:23:09 -0000 Message-ID: <43385F03.B0BDA733@freebsd.org> Date: Mon, 26 Sep 2005 22:50:11 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Sam Leffler References: <200509262035.j8QKZj04022444@repoman.freebsd.org> <43385C89.60009@errno.com> Content-Type: text/plain; charset=us-ascii 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 20:50:11 -0000 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. -- Andre