Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2023 05:58:34 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e0d0f0930ee2 - main - pseudofs: fix off by one in hash iteration in pfs_purge
Message-ID:  <202311200558.3AK5wYhT072257@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=e0d0f0930ee22af7bf38d28d8590d4e6c822871d

commit e0d0f0930ee22af7bf38d28d8590d4e6c822871d
Author:     Alvin Chen <weike.chen@dell.com>
AuthorDate: 2023-11-20 05:55:35 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-11-20 05:57:25 +0000

    pseudofs: fix off by one in hash iteration in pfs_purge
    
    Sponsored by:   Dell Technologies
    Differential Revision:  https://reviews.freebsd.org/D42628
---
 sys/fs/pseudofs/pseudofs_vncache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c
index 33023dd0d08f..e58aced7f81b 100644
--- a/sys/fs/pseudofs/pseudofs_vncache.c
+++ b/sys/fs/pseudofs/pseudofs_vncache.c
@@ -306,7 +306,7 @@ pfs_purge(struct pfs_node *pn)
 	mtx_lock(&pfs_vncache_mutex);
 restart:
 	removed = 0;
-	for (i = 0; i < pfs_vncache_hash; i++) {
+	for (i = 0; i <= pfs_vncache_hash; i++) {
 restart_chain:
 		SLIST_FOREACH(pvd, &pfs_vncache_hashtbl[i], pvd_hash) {
 			if (pn != NULL && pvd->pvd_pn != pn)



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