Linux NFS development
 help / color / mirror / Atom feed
From: yangerkun <yangerkun@huawei.com>
To: Chuck Lever <cel@kernel.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	Misbah Anjum N <misanjum@linux.ibm.com>,
	Jeff Layton <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>, <yi.zhang@huawei.com>,
	Zhihao Cheng <chengzhihao1@huawei.com>,
	Li Lingfeng <lilingfeng3@huawei.com>, <yangerkun@huaweicloud.com>
Subject: Re: [PATCH] Revert "NFSD: Defer sub-object cleanup in export put callbacks"
Date: Wed, 13 May 2026 09:27:29 +0800	[thread overview]
Message-ID: <cd07fc25-8c9d-42af-9bd8-36d1565a80ca@huawei.com> (raw)
In-Reply-To: <0ce8ae76-da17-4b25-b1f8-6fa955654a57@app.fastmail.com>



在 2026/5/12 21:48, Chuck Lever 写道:
> 
> On Mon, May 11, 2026, at 10:33 PM, Yang Erkun wrote:
>> This reverts commit 48db892356d6cb80f6942885545de4a6dd8d2a29.
>>
>> Commit 48db892356d6 ("NFSD: Defer sub-object cleanup in export put
>> callbacks") describes an issue where calling svc_export_put, path_put,
>> and auth_domain_put directly can cause use-after-free (UAF) errors when
>> accessing ex_path or ex_client->name. However, after discussion in [1],
>> it is clear that commit e7fcf179b82d ("NFSD: Hold net reference for the
>> lifetime of /proc/fs/nfs/exports fd") actually resolves this problem.
>>
>> Additionally, commit 48db892356d6 ("NFSD: Defer sub-object cleanup in
>> export put callbacks") introduces a regression that was already fixed by
>> commit 69d803c40ede ("nfsd: Revert "nfsd: release svc_expkey/svc_export
>> with rcu_work""). Therefore, reverting commit 48db892356d6 ("NFSD: Defer
>> sub-object cleanup in export put callbacks") is necessary to fix this
>> regression.
>>
>> Link:
>> https://lore.kernel.org/all/10019b42-4589-4f9f-8d5b-d8197db1ce3c@huawei.com/
>> [1]
>> Fixes: 48db892356d6 ("NFSD: Defer sub-object cleanup in export put
>> callbacks")
>> Signed-off-by: Yang Erkun <yangerkun@huawei.com>
>> ---
>>   fs/nfsd/export.c | 63 +++++++-----------------------------------------
>>   fs/nfsd/export.h |  7 ++----
>>   fs/nfsd/nfsctl.c |  8 +-----
>>   3 files changed, 12 insertions(+), 66 deletions(-)
>>
>> diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
>> index 665153f1720e..0baa58d1dbfc 100644
>> --- a/fs/nfsd/export.c
>> +++ b/fs/nfsd/export.c
>> @@ -36,30 +36,19 @@
>>    * second map contains a reference to the entry in the first map.
>>    */
>>
>> -static struct workqueue_struct *nfsd_export_wq;
>> -
> 
> Hi Erkun -
> 
> This patch doesn't apply to the nfsd-testing branch. What's more,
> the patch series already in flight removes nfsd_export_wq:

Hi Chuck,

Apologies, I initially submitted a patch based on the mainline, but I
will update it to be based on nfsd-testing later.

> 
> https://lore.kernel.org/linux-nfs/98268bb4-2e97-4728-96a6-37b2a4a3ae5d@app.fastmail.com/T/#t
> 
> That patch series replaces the nfsd_export_wq with a WQ that
> is managed in sunrpc.ko. Is that incorrect?
> 
> 

I'm not sure if I understood you correctly. Do you mean that since this
patchset has already removed nfsd_export_wq, I need to adapt more based
on this patchset? Or are you saying that replacing nfsd_export_wq with a
workqueue in sunrpc.ko might not be sufficient because they are two
completely different modules? If you prefer, I can adapt the patch based
on this patchset.

Thanks,
Erkun.

  reply	other threads:[~2026-05-13  1:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  2:33 [PATCH] Revert "NFSD: Defer sub-object cleanup in export put callbacks" Yang Erkun
2026-05-12 11:25 ` Jeff Layton
2026-05-12 12:19   ` yangerkun
2026-05-12 12:30     ` Jeff Layton
2026-05-12 12:36       ` yangerkun
2026-05-12 13:48 ` Chuck Lever
2026-05-13  1:27   ` yangerkun [this message]
2026-05-13  1:36     ` Chuck Lever
2026-05-13  1:55       ` yangerkun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd07fc25-8c9d-42af-9bd8-36d1565a80ca@huawei.com \
    --to=yangerkun@huawei.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=cel@kernel.org \
    --cc=chengzhihao1@huawei.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=lilingfeng3@huawei.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=misanjum@linux.ibm.com \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=yangerkun@huaweicloud.com \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox