aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/Makefile
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2019-03-19 11:33:24 +1100
committerMoyster <oysterized@gmail.com>2019-09-11 14:26:37 +0200
commit674fda09638452b55d18a727deb33841bd3307d4 (patch)
tree1991b3a725136b26d7cd789a0aa17947febc2d9a /scripts/basic/Makefile
parent8da16c8e6e19f84f6a60a661f1508876df6cc148 (diff)
NFS: fix mount/umount race in nlmclnt.
commit 4a9be28c45bf02fa0436808bb6c0baeba30e120e upstream. If the last NFSv3 unmount from a given host races with a mount from the same host, we can destroy an nlm_host that is still in use. Specifically nlmclnt_lookup_host() can increment h_count on an nlm_host that nlmclnt_release_host() has just successfully called refcount_dec_and_test() on. Once nlmclnt_lookup_host() drops the mutex, nlm_destroy_host_lock() will be called to destroy the nlmclnt which is now in use again. The cause of the problem is that the dec_and_test happens outside the locked region. This is easily fixed by using refcount_dec_and_mutex_lock(). Fixes: 8ea6ecc8b075 ("lockd: Create client-side nlm_host cache") Change-Id: I37405cb4379c96c2ca9780beaa916067e6aab7b3 Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> [bwh: Backported to 3.16: use atomic instead of refcount API] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts/basic/Makefile')
0 files changed, 0 insertions, 0 deletions