08 Apr, 2014

1 commit

  • Add VM_INIT_DEF_MASK, to allow us to set the default flags for VMs. It
    also adds a prctl control which allows us to set the THP disable bit in
    mm->def_flags so that VMs will pick up the setting as they are created.

    Signed-off-by: Alex Thorlton
    Suggested-by: Oleg Nesterov
    Cc: Gerald Schaefer
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Christian Borntraeger
    Cc: Paolo Bonzini
    Cc: "Kirill A. Shutemov"
    Cc: Mel Gorman
    Acked-by: Rik van Riel
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Andrea Arcangeli
    Cc: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Cc: Alexander Viro
    Cc: Johannes Weiner
    Cc: David Rientjes
    Cc: Paolo Bonzini
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Thorlton
     

23 Feb, 2014

1 commit

  • Signed-off-by: Dongsheng Yang
    Signed-off-by: Peter Zijlstra
    Cc: Andrew Morton
    Cc: Oleg Nesterov
    Cc: Robin Holt
    Cc: Al Viro
    Cc: Kees Cook
    Cc: "Eric W. Biederman"
    Cc: Stephen Rothwell
    Link: http://lkml.kernel.org/r/0261f094b836f1acbcdf52e7166487c0c77323c8.1392103744.git.yangds.fnst@cn.fujitsu.com
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Dongsheng Yang
     

24 Jan, 2014

2 commits


13 Nov, 2013

1 commit


31 Aug, 2013

1 commit


10 Jul, 2013

2 commits


04 Jul, 2013

3 commits


13 Jun, 2013

1 commit

  • We recently noticed that reboot of a 1024 cpu machine takes approx 16
    minutes of just stopping the cpus. The slowdown was tracked to commit
    f96972f2dc63 ("kernel/sys.c: call disable_nonboot_cpus() in
    kernel_restart()").

    The current implementation does all the work of hot removing the cpus
    before halting the system. We are switching to just migrating to the
    boot cpu and then continuing with shutdown/reboot.

    This also has the effect of not breaking x86's command line parameter
    for specifying the reboot cpu. Note, this code was shamelessly copied
    from arch/x86/kernel/reboot.c with bits removed pertaining to the
    reboot_cpu command line parameter.

    Signed-off-by: Robin Holt
    Tested-by: Shawn Guo
    Cc: "Srivatsa S. Bhat"
    Cc: H. Peter Anvin
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Russ Anderson
    Cc: Robin Holt
    Cc: Russell King
    Cc: Guan Xuetao
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     

01 May, 2013

3 commits

  • Pull compat cleanup from Al Viro:
    "Mostly about syscall wrappers this time; there will be another pile
    with patches in the same general area from various people, but I'd
    rather push those after both that and vfs.git pile are in."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    syscalls.h: slightly reduce the jungles of macros
    get rid of union semop in sys_semctl(2) arguments
    make do_mremap() static
    sparc: no need to sign-extend in sync_file_range() wrapper
    ppc compat wrappers for add_key(2) and request_key(2) are pointless
    x86: trim sys_ia32.h
    x86: sys32_kill and sys32_mprotect are pointless
    get rid of compat_sys_semctl() and friends in case of ARCH_WANT_OLD_COMPAT_IPC
    merge compat sys_ipc instances
    consolidate compat lookup_dcookie()
    convert vmsplice to COMPAT_SYSCALL_DEFINE
    switch getrusage() to COMPAT_SYSCALL_DEFINE
    switch epoll_pwait to COMPAT_SYSCALL_DEFINE
    convert sendfile{,64} to COMPAT_SYSCALL_DEFINE
    switch signalfd{,4}() to COMPAT_SYSCALL_DEFINE
    make SYSCALL_DEFINE-generated wrappers do asmlinkage_protect
    make HAVE_SYSCALL_WRAPPERS unconditional
    consolidate cond_syscall and SYSCALL_ALIAS declarations
    teach SYSCALL_DEFINE how to deal with long long/unsigned long long
    get rid of duplicate logics in __SC_....[1-6] definitions

    Linus Torvalds
     
  • The purpose of this patch is to allow privileged processes to set
    their own per-memory memory-region fields:

    start_code, end_code, start_data, end_data, start_brk, brk,
    start_stack, arg_start, arg_end, env_start, env_end.

    This functionality is needed by any application or package that needs to
    reconstruct Linux processes, that is, to start them in any way other than
    by means of an "execve()" from an executable file. This includes:

    1. Restoring processes from a checkpoint-file (by all potential
    user-level checkpointing packages, not only CRIU's).
    2. Restarting processes on another node after process migration.
    3. Starting duplicated copies of a running process (for reliability
    and high-availablity).
    4. Starting a process from an executable format that is not supported
    by Linux, thus requiring a "manual execve" by a user-level utility.
    5. Similarly, starting a process from a networked and/or crypted
    executable that, for confidentiality, licensing or other reasons,
    may not be written to the local file-systems.

    The code that does that was already included in the Linux kernel by the
    CRIU group, in the form of "prctl(PR_SET_MM)", but prior to this was
    enclosed within their private "#ifdef CONFIG_CHECKPOINT_RESTORE", which is
    normally disabled. The patch removes those ifdefs.

    Signed-off-by: Amnon Shiloh
    Cc: Cyrill Gorcunov
    Cc: Pavel Emelyanov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amnon Shiloh
     
  • Andrew Morton noted:

    akpm3:/usr/src/25> grep SYSCALL kernel/timer.c
    SYSCALL_DEFINE1(alarm, unsigned int, seconds)
    SYSCALL_DEFINE0(getpid)
    SYSCALL_DEFINE0(getppid)
    SYSCALL_DEFINE0(getuid)
    SYSCALL_DEFINE0(geteuid)
    SYSCALL_DEFINE0(getgid)
    SYSCALL_DEFINE0(getegid)
    SYSCALL_DEFINE0(gettid)
    SYSCALL_DEFINE1(sysinfo, struct sysinfo __user *, info)
    COMPAT_SYSCALL_DEFINE1(sysinfo, struct compat_sysinfo __user *, info)

    Only one of those should be in kernel/timer.c. Who wrote this thing?

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Stephen Rothwell
    Acked-by: Thomas Gleixner
    Cc: Guenter Roeck
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

09 Apr, 2013

1 commit

  • As commit 40dc166c (PM / Core: Introduce struct syscore_ops for core
    subsystems PM) say, syscore_ops operations should be carried with one
    CPU on-line and interrupts disabled. However, after commit f96972f2d
    (kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()),
    syscore_shutdown() is called before disable_nonboot_cpus(), so break
    the rules. We have a MIPS machine with a 8259A PIC, and there is an
    external timer (HPET) linked at 8259A. Since 8259A has been shutdown
    too early (by syscore_shutdown()), disable_nonboot_cpus() runs without
    timer interrupt, so it hangs and reboot fails. This patch call
    syscore_shutdown() a little later (after disable_nonboot_cpus()) to
    avoid reboot failure, this is the same way as poweroff does.

    For consistency, add disable_nonboot_cpus() to kernel_halt().

    Signed-off-by: Huacai Chen
    Cc:
    Signed-off-by: Rafael J. Wysocki

    Huacai Chen
     

23 Mar, 2013

1 commit

  • David said:

    Commit 6c0c0d4d1080 ("poweroff: fix bug in orderly_poweroff()")
    apparently fixes one bug in orderly_poweroff(), but introduces
    another. The comments on orderly_poweroff() claim it can be called
    from any context - and indeed we call it from interrupt context in
    arch/powerpc/platforms/pseries/ras.c for example. But since that
    commit this is no longer safe, since call_usermodehelper_fns() is not
    safe in interrupt context without the UMH_NO_WAIT option.

    orderly_poweroff() can be used from any context but UMH_WAIT_EXEC is
    sleepable. Move the "force" logic into __orderly_poweroff() and change
    orderly_poweroff() to use the global poweroff_work which simply calls
    __orderly_poweroff().

    While at it, remove the unneeded "int argc" and change argv_split() to
    use GFP_KERNEL.

    We use the global "bool poweroff_force" to pass the argument, this can
    obviously affect the previous request if it is pending/running. So we
    only allow the "false => true" transition assuming that the pending
    "true" should succeed anyway. If schedule_work() fails after that we
    know that work->func() was not called yet, it must see the new value.

    This means that orderly_poweroff() becomes async even if we do not run
    the command and always succeeds, schedule_work() can only fail if the
    work is already pending. We can export __orderly_poweroff() and change
    the non-atomic callers which want the old semantics.

    Signed-off-by: Oleg Nesterov
    Reported-by: Benjamin Herrenschmidt
    Reported-by: David Gibson
    Cc: Lucas De Marchi
    Cc: Feng Hong
    Cc: Kees Cook
    Cc: Serge Hallyn
    Cc: "Eric W. Biederman"
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

04 Mar, 2013

1 commit


28 Feb, 2013

1 commit

  • __orderly_poweroff() does argv_free() if call_usermodehelper_fns()
    returns -ENOMEM. As Lucas pointed out, this can be wrong if -ENOMEM was
    not triggered by the failing call_usermodehelper_setup(), in this case
    both __orderly_poweroff() and argv_cleanup() can do kfree().

    Kill argv_cleanup() and change __orderly_poweroff() to call argv_free()
    unconditionally like do_coredump() does. This info->cleanup() is not
    needed (and wrong) since 6c0c0d4d "fix bug in orderly_poweroff() which
    did the UMH_NO_WAIT => UMH_WAIT_EXEC change, we can rely on the fact
    that CLONE_VFORK can't return until do_execve() succeeds/fails.

    Signed-off-by: Oleg Nesterov
    Reported-by: Lucas De Marchi
    Cc: David Howells
    Cc: James Morris
    Cc: hongfeng
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

27 Feb, 2013

1 commit

  • Pull vfs pile (part one) from Al Viro:
    "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
    locking violations, etc.

    The most visible changes here are death of FS_REVAL_DOT (replaced with
    "has ->d_weak_revalidate()") and a new helper getting from struct file
    to inode. Some bits of preparation to xattr method interface changes.

    Misc patches by various people sent this cycle *and* ocfs2 fixes from
    several cycles ago that should've been upstream right then.

    PS: the next vfs pile will be xattr stuff."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
    saner proc_get_inode() calling conventions
    proc: avoid extra pde_put() in proc_fill_super()
    fs: change return values from -EACCES to -EPERM
    fs/exec.c: make bprm_mm_init() static
    ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
    ocfs2: fix possible use-after-free with AIO
    ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
    get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
    target: writev() on single-element vector is pointless
    export kernel_write(), convert open-coded instances
    fs: encode_fh: return FILEID_INVALID if invalid fid_type
    kill f_vfsmnt
    vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
    nfsd: handle vfs_getattr errors in acl protocol
    switch vfs_getattr() to struct path
    default SET_PERSONALITY() in linux/elf.h
    ceph: prepopulate inodes only when request is aborted
    d_hash_and_lookup(): export, switch open-coded instances
    9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
    9p: split dropping the acls from v9fs_set_create_acl()
    ...

    Linus Torvalds
     

26 Feb, 2013

1 commit

  • Pull user namespace and namespace infrastructure changes from Eric W Biederman:
    "This set of changes starts with a few small enhnacements to the user
    namespace. reboot support, allowing more arbitrary mappings, and
    support for mounting devpts, ramfs, tmpfs, and mqueuefs as just the
    user namespace root.

    I do my best to document that if you care about limiting your
    unprivileged users that when you have the user namespace support
    enabled you will need to enable memory control groups.

    There is a minor bug fix to prevent overflowing the stack if someone
    creates way too many user namespaces.

    The bulk of the changes are a continuation of the kuid/kgid push down
    work through the filesystems. These changes make using uids and gids
    typesafe which ensures that these filesystems are safe to use when
    multiple user namespaces are in use. The filesystems converted for
    3.9 are ceph, 9p, afs, ocfs2, gfs2, ncpfs, nfs, nfsd, and cifs. The
    changes for these filesystems were a little more involved so I split
    the changes into smaller hopefully obviously correct changes.

    XFS is the only filesystem that remains. I was hoping I could get
    that in this release so that user namespace support would be enabled
    with an allyesconfig or an allmodconfig but it looks like the xfs
    changes need another couple of days before it they are ready."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (93 commits)
    cifs: Enable building with user namespaces enabled.
    cifs: Convert struct cifs_ses to use a kuid_t and a kgid_t
    cifs: Convert struct cifs_sb_info to use kuids and kgids
    cifs: Modify struct smb_vol to use kuids and kgids
    cifs: Convert struct cifsFileInfo to use a kuid
    cifs: Convert struct cifs_fattr to use kuid and kgids
    cifs: Convert struct tcon_link to use a kuid.
    cifs: Modify struct cifs_unix_set_info_args to hold a kuid_t and a kgid_t
    cifs: Convert from a kuid before printing current_fsuid
    cifs: Use kuids and kgids SID to uid/gid mapping
    cifs: Pass GLOBAL_ROOT_UID and GLOBAL_ROOT_GID to keyring_alloc
    cifs: Use BUILD_BUG_ON to validate uids and gids are the same size
    cifs: Override unmappable incoming uids and gids
    nfsd: Enable building with user namespaces enabled.
    nfsd: Properly compare and initialize kuids and kgids
    nfsd: Store ex_anon_uid and ex_anon_gid as kuids and kgids
    nfsd: Modify nfsd4_cb_sec to use kuids and kgids
    nfsd: Handle kuids and kgids in the nfs4acl to posix_acl conversion
    nfsd: Convert nfsxdr to use kuids and kgids
    nfsd: Convert nfs3xdr to use kuids and kgids
    ...

    Linus Torvalds
     

23 Feb, 2013

1 commit


22 Feb, 2013

2 commits


27 Dec, 2012

1 commit

  • In a container with its own pid namespace and user namespace, rebooting
    the system won't reboot the host, but terminate all the processes in
    it and thus have the container shutdown, so it's safe.

    Signed-off-by: Li Zefan
    Signed-off-by: Eric W. Biederman

    Li Zefan
     

29 Nov, 2012

1 commit

  • We have thread_group_cputime() and thread_group_times(). The naming
    doesn't provide enough information about the difference between
    these two APIs.

    To lower the confusion, rename thread_group_times() to
    thread_group_cputime_adjusted(). This name better suggests that
    it's a version of thread_group_cputime() that does some stabilization
    on the raw cputime values. ie here: scale on top of CFS runtime
    stats and bound lower value for monotonicity.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Steven Rostedt
    Cc: Paul Gortmaker

    Frederic Weisbecker
     

20 Oct, 2012

2 commits

  • The min/max call needed to have explicit types on some architectures
    (e.g. mn10300). Use clamp_t instead to avoid the warning:

    kernel/sys.c: In function 'override_release':
    kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]

    Reported-by: Fengguang Wu
    Signed-off-by: Kees Cook
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Calling uname() with the UNAME26 personality set allows a leak of kernel
    stack contents. This fixes it by defensively calculating the length of
    copy_to_user() call, making the len argument unsigned, and initializing
    the stack buffer to zero (now technically unneeded, but hey, overkill).

    CVE-2012-0957

    Reported-by: PaX Team
    Signed-off-by: Kees Cook
    Cc: Andi Kleen
    Cc: PaX Team
    Cc: Brad Spengler
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

06 Oct, 2012

2 commits

  • orderly_poweroff is trying to poweroff platform in two steps:

    step 1: Call user space application to poweroff
    step 2: If user space poweroff fail, then do a force power off if force param
    is set.

    The bug here is, step 1 is always successful with param UMH_NO_WAIT, which obey
    the design goal of orderly_poweroff.

    We have two choices here:
    UMH_WAIT_EXEC which means wait for the exec, but not the process;
    UMH_WAIT_PROC which means wait for the process to complete.
    we need to trade off the two choices:

    If using UMH_WAIT_EXEC, there is potential issue comments by Serge E.
    Hallyn: The exec will have started, but may for whatever (very unlikely)
    reason fail.

    If using UMH_WAIT_PROC, there is potential issue comments by Eric W.
    Biederman: If the caller is not running in a kernel thread then we can
    easily get into a case where the user space caller will block waiting for
    us when we are waiting for the user space caller.

    Thanks for their excellent ideas, based on the above discussion, we
    finally choose UMH_WAIT_EXEC, which is much more safe, if the user
    application really fails, we just complain the application itself, it
    seems a better choice here.

    Signed-off-by: Feng Hong
    Acked-by: Kees Cook
    Acked-by: Serge Hallyn
    Cc: "Eric W. Biederman"
    Acked-by: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    hongfeng
     
  • As kernel_power_off() calls disable_nonboot_cpus(), we may also want to
    have kernel_restart() call disable_nonboot_cpus(). Doing so can help
    machines that require boot cpu be the last alive cpu during reboot to
    survive with kernel restart.

    This fixes one reboot issue seen on imx6q (Cortex-A9 Quad). The machine
    requires that the restart routine be run on the primary cpu rather than
    secondary ones. Otherwise, the secondary core running the restart
    routine will fail to come to online after reboot.

    Signed-off-by: Shawn Guo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shawn Guo
     

27 Sep, 2012

2 commits


31 Jul, 2012

2 commits

  • If argv_split() failed, the code will end up calling argv_free(NULL). Fix
    it up and clean things up a bit.

    Addresses Coverity report 703573.

    Cc: Cyrill Gorcunov
    Cc: Kees Cook
    Cc: Serge Hallyn
    Cc: "Eric W. Biederman"
    Cc: WANG Cong
    Cc: Alan Cox
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Just setting the "error" to error number is enough on failure and It
    doesn't require to set "error" variable to zero in each switch case,
    since it was already initialized with zero. And also removed return 0
    in switch case with break statement

    Signed-off-by: Sasikantha babu
    Acked-by: Kees Cook
    Acked-by: Serge E. Hallyn
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasikantha babu
     

12 Jul, 2012

1 commit

  • "no other files mapped" requirement from my previous patch (c/r: prctl:
    update prctl_set_mm_exe_file() after mm->num_exe_file_vmas removal) is too
    paranoid, it forbids operation even if there mapped one shared-anon vma.

    Let's check that current mm->exe_file already unmapped, in this case
    exe_file symlink already outdated and its changing is reasonable.

    Plus, this patch fixes exit code in case operation success.

    Signed-off-by: Konstantin Khlebnikov
    Reported-by: Cyrill Gorcunov
    Tested-by: Cyrill Gorcunov
    Cc: Oleg Nesterov
    Cc: Matt Helsley
    Cc: Kees Cook
    Cc: KOSAKI Motohiro
    Cc: Tejun Heo
    Cc: Pavel Emelyanov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     

21 Jun, 2012

1 commit

  • During merging of PR_GET_TID_ADDRESS patch the code has been misplaced (it
    happened to appear under PR_MCE_KILL) in result noone can use this option.

    Fix it by moving code snippet to a proper place.

    Signed-off-by: Cyrill Gorcunov
    Acked-by: Kees Cook
    Cc: Oleg Nesterov
    Cc: Pavel Emelyanov
    Cc: Andrey Vagin
    Cc: Serge Hallyn
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     

08 Jun, 2012

4 commits

  • In commit b76437579d13 ("procfs: mark thread stack correctly in
    proc//maps") the stack allocated via clone() is marked in
    /proc//maps as [stack:%d] thus it might be out of the former
    mm->start_stack/end_stack values (and even has some custom VMA flags
    set).

    So to be able to restore mm->start_stack/end_stack drop vma flags test,
    but still require the underlying VMA to exist.

    As always note this feature is under CONFIG_CHECKPOINT_RESTORE and
    requires CAP_SYS_RESOURCE to be granted.

    Signed-off-by: Cyrill Gorcunov
    Cc: Oleg Nesterov
    Acked-by: Kees Cook
    Cc: Pavel Emelyanov
    Cc: Serge Hallyn
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     
  • Zero is written at clear_tid_address when the process exits. This
    functionality is used by pthread_join().

    We already have sys_set_tid_address() to change this address for the
    current task but there is no way to obtain it from user space.

    Without the ability to find this address and dump it we can't restore
    pthread'ed apps which call pthread_join() once they have been restored.

    This patch introduces the PR_GET_TID_ADDRESS prctl option which allows
    the current process to obtain own clear_tid_address.

    This feature is available iif CONFIG_CHECKPOINT_RESTORE is set.

    [akpm@linux-foundation.org: fix prctl numbering]
    Signed-off-by: Andrew Vagin
    Signed-off-by: Cyrill Gorcunov
    Cc: Pedro Alves
    Cc: Oleg Nesterov
    Cc: Pavel Emelyanov
    Cc: Tejun Heo
    Acked-by: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     
  • Make sure the address being set is greater than mmap_min_addr (as
    suggested by Kees Cook).

    Signed-off-by: Cyrill Gorcunov
    Acked-by: Kees Cook
    Cc: Serge Hallyn
    Cc: Tejun Heo
    Cc: Pavel Emelyanov
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     
  • A fix for commit b32dfe377102 ("c/r: prctl: add ability to set new
    mm_struct::exe_file").

    After removing mm->num_exe_file_vmas kernel keeps mm->exe_file until
    final mmput(), it never becomes NULL while task is alive.

    We can check for other mapped files in mm instead of checking
    mm->num_exe_file_vmas, and mark mm with flag MMF_EXE_FILE_CHANGED in
    order to forbid second changing of mm->exe_file.

    Signed-off-by: Konstantin Khlebnikov
    Reviewed-by: Cyrill Gorcunov
    Cc: Oleg Nesterov
    Cc: Matt Helsley
    Cc: Kees Cook
    Cc: KOSAKI Motohiro
    Cc: Tejun Heo
    Cc: Pavel Emelyanov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov