Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 07:31:11 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299916 - head/sys/kern
Message-ID:  <201605160731.u4G7VBZX080300@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon May 16 07:31:11 2016
New Revision: 299916
URL: https://svnweb.freebsd.org/changeset/base/299916

Log:
  vfs_read_dirent: increment ncookies after adding a cookie
  
  It seems that at present vfs_read_dirent() is used only with filesystems
  that do not support cookies, so the bug never manifested itself.
  
  MFC after:	1 week

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Mon May 16 07:29:50 2016	(r299915)
+++ head/sys/kern/vfs_subr.c	Mon May 16 07:31:11 2016	(r299916)
@@ -5053,6 +5053,7 @@ vfs_read_dirent(struct vop_readdir_args 
 	*ap->a_cookies = realloc(*ap->a_cookies,
 	    (*ap->a_ncookies + 1) * sizeof(u_long), M_TEMP, M_WAITOK | M_ZERO);
 	(*ap->a_cookies)[*ap->a_ncookies] = off;
+	*ap->a_ncookies += 1;
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605160731.u4G7VBZX080300>