From: NeilBrown Date: Wed, 4 Oct 2006 09:15:44 +0000 (-0700) Subject: [PATCH] knfsd: Protect update to sn_nrthreads with lock_kernel X-Git-Tag: firefly_0821_release~32512 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cda9e0cd8a6b30ccc32edced066c378fbd87003d;p=firefly-linux-kernel-4.4.55.git [PATCH] knfsd: Protect update to sn_nrthreads with lock_kernel Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 83997282fc1a..f85472dda463 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -532,7 +532,9 @@ static ssize_t write_ports(struct file *file, char *buf, size_t size) /* Decrease the count, but don't shutdown the * the service */ + lock_kernel(); nfsd_serv->sv_nrthreads--; + unlock_kernel(); } return err; }