+ coredump-replace-opencoded-set_mask_bits.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/exec.c: replace opencoded set_mask_bits()
has been added to the -mm tree.  Its filename is
     coredump-replace-opencoded-set_mask_bits.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/coredump-replace-opencoded-set_mask_bits.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/coredump-replace-opencoded-set_mask_bits.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Vineet Gupta <vineet.gupta1@xxxxxxxxxxxx>
Subject: fs/exec.c: replace opencoded set_mask_bits()

Link: http://lkml.kernel.org/r/1548275584-18096-2-git-send-email-vgupta@xxxxxxxxxxxx
Link: http://lkml.kernel.org/g/20150807115710.GA16897@xxxxxxxxxx
Signed-off-by: Vineet Gupta <vgupta@xxxxxxxxxxxx>
Reviewed-by: Anthony Yznaga <anthony.yznaga@xxxxxxxxxx>
Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
Cc: Miklos Szeredi <mszeredi@xxxxxxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/exec.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/fs/exec.c~coredump-replace-opencoded-set_mask_bits
+++ a/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,
_

Patches currently in -mm which might be from vineet.gupta1@xxxxxxxxxxxx are

coredump-replace-opencoded-set_mask_bits.patch
fs-inode_set_flags-replace-opencoded-set_mask_bits.patch
bitopsh-set_mask_bits-to-return-old-value.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux