
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICM78G CVE: NA -------------------------------- Commit c69899a17ca4 ("[Huawei] nfs: fix the race of lock/unlock and open") added a write lock release operation in the out branch of nfs_delegation_claim_locks(), which will cause the write lock to be released without holding it when flctx is null. Fixes: c69899a17ca4 ("[Huawei] nfs: fix the race of lock/unlock and open") Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> --- fs/nfs/delegation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 2ed9edf9f7ed..1a4a28cd3ba2 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -113,7 +113,7 @@ static int nfs_delegation_claim_locks(struct nfs4_state *state, const nfs4_state int status = 0; if (flctx == NULL) - goto out; + return status; list = &flctx->flc_posix; down_write(&nfsi->rwsem); -- 2.31.1