linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] coredump: Replace opencoded set_mask_bits()
@ 2015-08-07  8:16 Vineet Gupta
  2015-08-07 11:57 ` Oleg Nesterov
  0 siblings, 1 reply; 8+ messages in thread
From: Vineet Gupta @ 2015-08-07  8:16 UTC (permalink / raw)
  To: Alexander Viro
  Cc: Vineet Gupta, Oleg Nesterov, Peter Zijlstra (Intel),
	linux-fsdevel, linux-kernel

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 fs/exec.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 1977c2a553ac..25078627f048 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1690,15 +1690,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 = ACCESS_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,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-07 16:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07  8:16 [PATCH] coredump: Replace opencoded set_mask_bits() Vineet Gupta
2015-08-07 11:57 ` Oleg Nesterov
2015-08-07 14:44   ` Vineet Gupta
2015-08-07 14:57     ` Peter Zijlstra
2015-08-07 15:35       ` Vineet Gupta
2015-08-07 15:45         ` Peter Zijlstra
2015-08-07 15:58           ` Vineet Gupta
2015-08-07 16:09             ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).