Date: Wed, 03 Jul 2013 14:26:01 +1000 From: Lawrence Stewart <lstewart@freebsd.org> To: src-committers@FreeBSD.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r252533 - stable/8/sys/kern Message-ID: <51D3A7D9.8030200@freebsd.org> In-Reply-To: <201307030340.r633e6RZ005391@svn.freebsd.org> References: <201307030340.r633e6RZ005391@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07/03/13 13:40, Lawrence Stewart wrote: > Author: lstewart > Date: Wed Jul 3 03:40:06 2013 > New Revision: 252533 > URL: http://svnweb.freebsd.org/changeset/base/252533 > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51D3A7D9.8030200>