Cc: Alexander Viro <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/g/[email protected]
Reviewed-by: Anthony Yznaga <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
---
fs/exec.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
index fb72d36f7823..df7f05362283 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,
--
2.7.4