Merge patch series "RISC-V: Probe for misaligned access speed"
[platform/kernel/linux-starfive.git] / kernel / pid_namespace.c
index 0bf44af..619972c 100644 (file)
@@ -110,9 +110,9 @@ static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns
        ns->user_ns = get_user_ns(user_ns);
        ns->ucounts = ucounts;
        ns->pid_allocated = PIDNS_ADDING;
-
-       initialize_memfd_noexec_scope(ns);
-
+#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
+       ns->memfd_noexec_scope = pidns_memfd_noexec_scope(parent_pid_ns);
+#endif
        return ns;
 
 out_free_idr: