Lack of memory can cause nfs_lock_context allocation failures in unlock paths, triggering NULL pointer dereference upon unlock completion. Additionally, failed nfs_open_context acquisition may lead to similar vulnerabilities. Proper error handling during lock/unlock data initialization prevents critical faults. Li Lingfeng (2): nfs: handle failure of nfs_get_lock_context in unlock path nfs: handle failure of get_nfs_open_context fs/nfs/nfs4proc.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -- 2.31.1