]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
NFSv4.1: Fix a potential layoutget/layoutrecall deadlock
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 12 Jul 2018 18:19:03 +0000 (14:19 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:47:55 +0000 (19:47 -0600)
commit43aad8375ce967d4bf05c3fe413f28e6c8818e8b
tree652615184dc346dd4d9a8b461b8a0b9af3a0a326
parent85b26908068ad647965aea481dc4708eafc8ef9d
NFSv4.1: Fix a potential layoutget/layoutrecall deadlock

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit bd3d16a887b0c19a2a20d35ffed499e3a3637feb ]

If the client is sending a layoutget, but the server issues a callback
to recall what it thinks may be an outstanding layout, then we may find
an uninitialised layout attached to the inode due to the layoutget.
In that case, it is appropriate to return NFS4ERR_NOMATCHING_LAYOUT
rather than NFS4ERR_DELAY, as the latter can end up deadlocking.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/nfs/callback_proc.c