From owner-svn-src-stable@FreeBSD.ORG Wed Jul 3 04:25:01 2013 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 075FF88C; Wed, 3 Jul 2013 04:25:01 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 856C61AD5; Wed, 3 Jul 2013 04:24:54 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 589E27E84A; Wed, 3 Jul 2013 14:24:46 +1000 (EST) Message-ID: <51D3A78E.4070701@freebsd.org> Date: Wed, 03 Jul 2013 14:24:46 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130521 Thunderbird/17.0.6 MIME-Version: 1.0 To: src-committers@FreeBSD.org Subject: Re: svn commit: r252532 - stable/9/sys/kern References: <201307030336.r633aaqt003512@svn.freebsd.org> In-Reply-To: <201307030336.r633aaqt003512@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-9@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2013 04:25:01 -0000 On 07/03/13 13:36, Lawrence Stewart wrote: > Author: lstewart > Date: Wed Jul 3 03:36:36 2013 > New Revision: 252532 > URL: http://svnweb.freebsd.org/changeset/base/252532 > > Log: MFC r251984: > When a previous call to sbsndptr() leaves sb->sb_sndptroff at the start of an > mbuf that was fully consumed by the previous call, the mbuf ptr returned by the > current call ends up being the previous mbuf in the sb chain to the one that > contains the data we want. > > This does not cause any observable issues because the mbuf copy routines happily > walk the mbuf chain to get to the data at the moff offset, which in this case > means they effectively skip over the mbuf returned by sbsndptr(). > > We can't adjust sb->sb_sndptr during the previous call for this case because the > next mbuf in the chain may not exist yet. We therefore need to detect the > condition and make the adjustment during the current call. > > Fix by detecting the special case of moff being at the start of the next mbuf in > the chain and adjust the required accounting variables accordingly. > > Reviewed by: andre