]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.1: Fix a race in nfs4_proc_layoutget
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 27 Jun 2017 21:33:38 +0000 (17:33 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 28 Jun 2017 01:44:58 +0000 (21:44 -0400)
commit5681d4c6d56bd8e904df6ccc3bbcec671488d490
tree4a6fba8ee37663af6c2405c631ec612c9ba4651a
parentf6ecc4cb47c5ac66d0b8a0a89560bae32515648f
NFSv4.1: Fix a race in nfs4_proc_layoutget

If the task calling layoutget is signalled, then it is possible for the
calls to nfs4_sequence_free_slot() and nfs4_layoutget_prepare() to race,
in which case we leak a slot.
The fix is to move the call to nfs4_sequence_free_slot() into the
nfs4_layoutget_release() so that it gets called at task teardown time.

Fixes: 02b1f3e6c0b2 ("NFSv4.1: Close callback races for OPEN, LAYOUTGET...")
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c