git: e6d025c5c57d - stable/13 - pseudofs: fix off by one in hash iteration in pfs_purge
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Nov 2023 19:47:23 UTC
The branch stable/13 has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=e6d025c5c57dbcf4f7b078c9d42533e5839af932
commit e6d025c5c57dbcf4f7b078c9d42533e5839af932
Author: Alvin Chen <weike.chen@dell.com>
AuthorDate: 2023-11-20 05:55:35 +0000
Commit: Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-11-24 19:47:15 +0000
pseudofs: fix off by one in hash iteration in pfs_purge
Sponsored by: Dell Technologies
Differential Revision: https://reviews.freebsd.org/D42628
(cherry picked from commit e0d0f0930ee22af7bf38d28d8590d4e6c822871d)
---
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 c1aee2ff4ae1..82dfc7a5366f 100644
--- a/sys/fs/pseudofs/pseudofs_vncache.c
+++ b/sys/fs/pseudofs/pseudofs_vncache.c
@@ -305,7 +305,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)