Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NFSv4.1: handle memory allocation failure in nfs4_schedule_state_mana…
…ger() If memory allocation fail in nfs4_schedule_state_manager() when mount NFSv4.1/NFSv4.2, nfs4_run_state_manager() will not be called, and current construction state will never be marked as ready or failed, nfs_wait_client_init_complete() will wait forever, as shown below: syscall(mount) ... nfs4_init_client nfs4_discover_server_trunking nfs41_discover_server_trunking nfs4_schedule_state_manager kthread_run /* nfs4_run_state_manager() will not be called */ kthread_create kthread_create_on_node __kthread_create_on_node create = kmalloc() = NULL return ERR_PTR(-ENOMEM) nfs_wait_client_init_complete /* wait forever */ Fix this by checking return value of nfs4_schedule_state_manager() which can indicate whether kernel thread is created successful. Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
- Loading branch information