Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752171AbbHGIRQ (ORCPT ); Fri, 7 Aug 2015 04:17:16 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:53138 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751046AbbHGIRI (ORCPT ); Fri, 7 Aug 2015 04:17:08 -0400 From: Vineet Gupta To: Alexander Viro CC: Vineet Gupta , Oleg Nesterov , "Peter Zijlstra (Intel)" , , Subject: [PATCH] coredump: Replace opencoded set_mask_bits() Date: Fri, 7 Aug 2015 13:46:46 +0530 Message-ID: <1438935406-5762-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.12.197.191] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 39 Cc: Alexander Viro Cc: Oleg Nesterov Cc: Peter Zijlstra (Intel) Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta --- 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 -- 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/