svn commit: r292772 - head/sys/vm

Shawn Webb shawn.webb at hardenedbsd.org
Tue Dec 29 23:32:01 UTC 2015


On Tue, Dec 29, 2015 at 11:59:52PM +0300, Gleb Smirnoff wrote:
> On Sun, Dec 27, 2015 at 02:42:39PM +0000, Konstantin Belousov wrote:
> K> Author: kib
> K> Date: Sun Dec 27 14:42:39 2015
> K> New Revision: 292772
> K> URL: https://svnweb.freebsd.org/changeset/base/292772
> K> 
> K> Log:
> K>   Add missed relpbuf() for a smallfs page-in.
> K>   
> K>   Reported by:	Shawn Webb
> K>   Tested by:	pho
> K>   Sponsored by:	The FreeBSD Foundation
> K> 
> K> Modified:
> K>   head/sys/vm/vnode_pager.c
> K> 
> K> Modified: head/sys/vm/vnode_pager.c
> K> ==============================================================================
> K> --- head/sys/vm/vnode_pager.c	Sun Dec 27 14:39:47 2015	(r292771)
> K> +++ head/sys/vm/vnode_pager.c	Sun Dec 27 14:42:39 2015	(r292772)
> K> @@ -806,6 +806,7 @@ vnode_pager_generic_getpages(struct vnod
> K>  	 * than a page size, then use special small filesystem code.
> K>  	 */
> K>  	if (pagesperblock == 0) {
> K> +		relpbuf(bp, freecnt);
> K>  		for (i = 0; i < count; i++) {
> K>  			PCPU_INC(cnt.v_vnodein);
> K>  			PCPU_INC(cnt.v_vnodepgsin);
> 
> The reason for this bug is that I tried to move the (pagesperblock == 0)
> block above the call to getpbuf().
> 
> We actually know that filesystem is "small" at the very beginning of the
> function and we can branch into "small filesystem" pager immediately.
> 
> Later I moved the block back to its place, simply because new place
> wasn't tested properly. And forgot to restore relpbuf.
> 
> What filesystem did you use to show up the bug? I'm about to test the
> variant with immediate branching. Shawn, would you be able to test
> a patch if I produce one?

Definitely. Send me a patch and I can spin up an ISO with it and boot it
up in bhyve.

Thanks,

-- 
Shawn Webb
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20151229/74171f22/attachment.sig>


More information about the svn-src-all mailing list