mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
fs/exec.c: replace opencoded set_mask_bits()
Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/g/[email protected] Signed-off-by: Vineet Gupta <[email protected]> Reviewed-by: Anthony Yznaga <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Miklos Szeredi <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
67ceb1eca0
commit
26e152252e
1 changed files with 1 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue