Re: [PATCH] coredump: Replace opencoded set_mask_bits()

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

 



On 08/07, Vineet Gupta wrote:
>
> --- 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);
>  }

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux