nfsd: disable usermode helper client tracker in container
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Fri, 1 Feb 2013 12:56:22 +0000 (15:56 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 15 Feb 2013 16:21:01 +0000 (11:21 -0500)
This tracker uses khelper kthread to execute binaries.
Execution itself is done from kthread context - i.e. global root is used.
This is not suitable for containers with own root.
So, disable this tracker for a while.

Note: one of possible solutions can be pass "init" callback to khelper, which
will swap root to desired one.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4recover.c

index ba6fdd4a0455d6c2f970e2bb33ec3a5e369dce8d..e0ae1cf18a8217f2ab734106d6544a60f14690a1 100644 (file)
@@ -1185,6 +1185,12 @@ bin_to_hex_dup(const unsigned char *src, int srclen)
 static int
 nfsd4_umh_cltrack_init(struct net __attribute__((unused)) *net)
 {
+       /* XXX: The usermode helper s not working in container yet. */
+       if (net != &init_net) {
+               WARN(1, KERN_ERR "NFSD: attempt to initialize umh client "
+                       "tracking in a container!\n");
+               return -EINVAL;
+       }
        return nfsd4_umh_cltrack_upcall("init", NULL, NULL);
 }