From patchwork Thu Jul 12 12:45:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 28336 Received: (qmail 3958 invoked by alias); 12 Jul 2018 12:45:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 3716 invoked by uid 89); 12 Jul 2018 12:45:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:734 X-HELO: mx1.redhat.com Date: Thu, 12 Jul 2018 14:45:09 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] nptl: Use __mprotect consistently for _STACK_GROWS_UP User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20180712124509.8516143994575@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2018-07-12 Florian Weimer * nptl/allocatestack.c [_STACK_GROWS_UP] (allocate_stack): Call __mprotect, not mprotect. Reviewed-by: Carlos O'Donell diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index f9e053f9e5..04e3f08465 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -728,7 +728,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, /* The guard size difference might be > 0, but once rounded to the nearest page the size difference might be zero. */ if (new_guard > old_guard - && mprotect (old_guard, new_guard - old_guard, prot) != 0) + && __mprotect (old_guard, new_guard - old_guard, prot) != 0) goto mprot_error; #endif