LOCKD: fix races in nsm_client_get
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 23 Oct 2012 17:51:58 +0000 (13:51 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 24 Oct 2012 14:46:22 +0000 (10:46 -0400)
commita4ee8d978e47e79d536226dccb48991f70091168
tree5c85033eae24348ec07dc9a0a3ddbb25141153bb
parentf878b657ce8e7d3673afe48110ec208a29e38c4a
LOCKD: fix races in nsm_client_get

Commit e9406db20fecbfcab646bad157b4cfdc7cadddfb (lockd: per-net
NSM client creation and destruction helpers introduced) contains
a nasty race on initialisation of the per-net NSM client because
it doesn't check whether or not the client is set after grabbing
the nsm_create_mutex.

Reported-by: Nix <nix@esperi.org.uk>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
fs/lockd/mon.c