From patchwork Mon Feb 10 01:36:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-109346-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=V1lIEPBR; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48G7m621GSz9sRQ for ; Mon, 10 Feb 2020 12:36:22 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=Ma3 6OjFSjtby5fFYk2WMGNnIGx4aXmi5N1VDPFfHSxuhNF9PNYfAbVxJYpKlPU67ct/ Hmttu6nog3WDD/BGWDEhE3eHj4KBVycWHtSFilvldEtKReUtcBtc/2uVSR2Smybk qp/KgrtYvZ1BDl//PzPl2KzOY2bMuI4GPC5BPPqw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=4rcrER9XR PXNcSjHx/HZrV4mkQM=; b=V1lIEPBR3HQ0HYytMTH4vBbMj87ah7r7q7ZZwBgai l8e0jraAT4z474D7OupzJj1JE9HChCgbxbPY4RgGUzYIoCCRHqEH0a2NzmprAoAL 84s87T50i7iFPKqvkLW55tB5zpRXLNiw4H2R7QBNzYmlUzmKhXMJ4rJQDJ9QofvL 3E= Received: (qmail 9813 invoked by alias); 10 Feb 2020 01:36:15 -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 9793 invoked by uid 89); 10 Feb 2020 01:36:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited 1/2] htl: Make joining self return EDEADLK Date: Mon, 10 Feb 2020 02:36:06 +0100 Message-Id: <20200210013607.430062-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- htl/pt-join.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htl/pt-join.c b/htl/pt-join.c index 43878a3d52..ab77af52c1 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -30,6 +30,9 @@ __pthread_join (pthread_t thread, void **status) struct __pthread *pthread; int err = 0; + if (thread == pthread_self ()) + return EDEADLK; + /* Lookup the thread structure for THREAD. */ pthread = __pthread_getid (thread); if (pthread == NULL)