Patch "NFSv4.x: Fail client initialisation if state manager thread can't run" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    NFSv4.x: Fail client initialisation if state manager thread can't run

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsv4.x-fail-client-initialisation-if-state-manager-.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 87c1de54e7cf4cbbe68bcf56579cc18ea69959a5
Author: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Date:   Tue Dec 6 12:42:59 2022 -0500

    NFSv4.x: Fail client initialisation if state manager thread can't run
    
    [ Upstream commit b4e4f66901658fae0614dea5bf91062a5387eda7 ]
    
    If the state manager thread fails to start, then we should just mark the
    client initialisation as failed so that other processes or threads don't
    get stuck in nfs_wait_client_init_complete().
    
    Reported-by: ChenXiaoSong <chenxiaosong2@xxxxxxxxxx>
    Fixes: 4697bd5e9419 ("NFSv4: Fix a race in the net namespace mount notification")
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index a77a3d8c0b3f..175b2e064003 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1226,6 +1226,8 @@ void nfs4_schedule_state_manager(struct nfs_client *clp)
 	if (IS_ERR(task)) {
 		printk(KERN_ERR "%s: kthread_run: %ld\n",
 			__func__, PTR_ERR(task));
+		if (!nfs_client_init_is_complete(clp))
+			nfs_mark_client_ready(clp, PTR_ERR(task));
 		nfs4_clear_state_manager_bit(clp);
 		nfs_put_client(clp);
 		module_put(THIS_MODULE);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux