mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
NFS: Fix a double unlock from nfs_match,get_client
[ Upstream commitc260121a97
] Now that nfs_match_client drops the nfs_client_lock, we should be careful to always return it in the same condition: locked. Fixes:950a578c61
("NFS: make nfs_match_client killable") Reported-by: syzbot+228a82b263b5da91883d@syzkaller.appspotmail.com Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3d5e860adf
commit
de69696bd6
1 changed files with 1 additions and 1 deletions
|
@ -305,9 +305,9 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat
|
|||
spin_unlock(&nn->nfs_client_lock);
|
||||
error = nfs_wait_client_init_complete(clp);
|
||||
nfs_put_client(clp);
|
||||
spin_lock(&nn->nfs_client_lock);
|
||||
if (error < 0)
|
||||
return ERR_PTR(error);
|
||||
spin_lock(&nn->nfs_client_lock);
|
||||
goto again;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue