projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67ceb1e
)
fs/exec.c: replace opencoded set_mask_bits()
author
Vineet Gupta
<
[email protected]
>
Fri, 8 Mar 2019 00:29:23 +0000
(16:29 -0800)
committer
Linus Torvalds
<
[email protected]
>
Fri, 8 Mar 2019 02:32:01 +0000
(18:32 -0800)
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]
>
fs/exec.c
patch
|
blob
|
history
diff --git
a/fs/exec.c
b/fs/exec.c
index 74f3672146a7e208b75488f0a8861a6ee0c05b5d..bf0ace3841ad6efc27ab37b88a32d5a367aad159 100644
(file)
--- 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,