Author: mjg Date: Thu Oct 20 19:55:50 2016 New Revision: 307685 URL: https://svnweb.freebsd.org/changeset/base/307685
Log: cache: fix up a corner case in r307650 If no negative entry is found on the last list, the ncp pointer will be left uninitialized and a non-null value will make the function assume an entry was found. Fix the problem by initializing to NULL on entry. Reported by: glebius Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Oct 20 19:42:26 2016 (r307684) +++ head/sys/kern/vfs_cache.c Thu Oct 20 19:55:50 2016 (r307685) @@ -763,6 +763,8 @@ cache_negative_shrink_select(int start, struct namecache *ncp; int i; + *ncpp = ncp = NULL; + for (i = start; i < numneglists; i++) { neglist = &neglists[i]; if (TAILQ_FIRST(&neglist->nl_list) == NULL) _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"