From: Stanislav Kinsbursky Date: Fri, 1 Feb 2013 12:56:22 +0000 (+0300) Subject: nfsd: disable usermode helper client tracker in container X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=71a50306934f416e74ba27cbfb88855c22251525;p=linux-beck.git nfsd: disable usermode helper client tracker in container 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 Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index ba6fdd4a0455..e0ae1cf18a82 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -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); }