diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/exec.c b/fs/exec.c index 74f3672146a7..bf0ace3841ad 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1944,15 +1944,10 @@ EXPORT_SYMBOL(set_binfmt); */ void set_dumpable(struct mm_struct *mm, int value) { - unsigned long old, new; - if (WARN_ON((unsigned)value > SUID_DUMP_ROOT)) return; - do { - old = READ_ONCE(mm->flags); - new = (old & ~MMF_DUMPABLE_MASK) | value; - } while (cmpxchg(&mm->flags, old, new) != old); + set_mask_bits(&mm->flags, MMF_DUMPABLE_MASK, value); } SYSCALL_DEFINE3(execve, |