Re: [PATCH v2] NFS: defer access-cache entry and group_info free past RCU
From: Cheng Yongkang
Date: Sun Nov 29 2026 - 23:50:22 EST
On Sat, 2026-11-28 at 20:06 -0500, Trond Myklebust wrote:
>> + INIT_RCU_WORK(&entry->rcu_work, nfs_access_free_entry_work);
>> + queue_rcu_work(nfsiod_workqueue, &entry->rcu_work);
>
> Why is this a workqueue job and not just an RCU callback?
There is no need for one. I assumed put_group_info() could not run
from an RCU callback because groups_free() uses kvfree(), but kvfree()
may be called in interrupt context: vfree() hands the area to
vfree_atomic() there. put_cred_rcu() already drops a group_info
reference from an RCU callback.
I'll send a v3 that frees the entry with call_rcu() and leaves struct
nfs_access_entry unchanged.
Thanks,
Cheng