]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
NFS: Fix an RCU lock leak in nfs4_refresh_delegation_stateid()
authorTrond Myklebust <trondmy@gmail.com>
Thu, 31 Oct 2019 22:40:33 +0000 (18:40 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:20 +0000 (18:47 +0100)
commit7a10df1d2d6055a158a956f01ea052c87d602b94
treeb48a47774ab48246c42cb55a758ce6c7f99a5c1a
parent9566e9fa8690b207f7128ddacc515a1d6af9cd62
NFS: Fix an RCU lock leak in nfs4_refresh_delegation_stateid()

BugLink: https://bugs.launchpad.net/bugs/1851550
commit 79cc55422ce99be5964bde208ba8557174720893 upstream.

A typo in nfs4_refresh_delegation_stateid() means we're leaking an
RCU lock, and always returning a value of 'false'. As the function
description states, we were always supposed to return 'true' if a
matching delegation was found.

Fixes: 12f275cdd163 ("NFSv4: Retry CLOSE and DELEGRETURN on NFS4ERR_OLD_STATEID.")
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/nfs/delegation.c