Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752964AbbHGL7T (ORCPT ); Fri, 7 Aug 2015 07:59:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46723 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbbHGL7S (ORCPT ); Fri, 7 Aug 2015 07:59:18 -0400 Date: Fri, 7 Aug 2015 13:57:10 +0200 From: Oleg Nesterov To: Vineet Gupta Cc: Alexander Viro , "Peter Zijlstra (Intel)" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coredump: Replace opencoded set_mask_bits() Message-ID: <20150807115710.GA16897@redhat.com> References: <1438935406-5762-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438935406-5762-1-git-send-email-vgupta@synopsys.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 781 Lines: 27 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/