From 87328e07e045febaae309d630ba2bf8a3b10bb5c Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 21 Sep 2005 15:28:07 +0000 Subject: [PATCH] Pass 'curthread' into VFS_STATFS() from acctwatch(), rather than passing NULL. The NFS client expects that a thread will always be present for a VOP so that it can check for signal conditions, and will dereference a NULL pointer if one isn't present. MFC after: 3 days --- sys/kern/kern_acct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index d0f2845fe66..5811608fd61 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -400,7 +400,7 @@ acctwatch(a) mtx_unlock(&acct_mtx); return; } - (void)VFS_STATFS(savacctp->v_mount, &sb, (struct thread *)0); + (void)VFS_STATFS(savacctp->v_mount, &sb, curthread); if (sb.f_bavail > acctresume * sb.f_blocks / 100) { acctp = savacctp; acctcred = savacctcred; @@ -422,7 +422,7 @@ acctwatch(a) mtx_unlock(&acct_mtx); return; } - (void)VFS_STATFS(acctp->v_mount, &sb, (struct thread *)0); + (void)VFS_STATFS(acctp->v_mount, &sb, curthread); if (sb.f_bavail <= acctsuspend * sb.f_blocks / 100) { savacctp = acctp; savacctflags = acctflags;