]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] knfsd: Protect update to sn_nrthreads with lock_kernel
authorNeilBrown <neilb@suse.de>
Wed, 4 Oct 2006 09:15:44 +0000 (02:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 14:55:15 +0000 (07:55 -0700)
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/nfsctl.c

index 83997282fc1aad512315e96eb90eab43ea2e47f4..f85472dda46312df02ccff615d1019cd2bcdc6a0 100644 (file)
@@ -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;
        }