Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1501752ybf; Sun, 1 Mar 2020 11:00:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxFfHEVSP8epEj2CAADSSplszKn8RpaPHxxelt1SLBHmOPWkalRMtm3zdsR/GjWBg0SnJ4K X-Received: by 2002:aca:cdd1:: with SMTP id d200mr8795238oig.153.1583089245589; Sun, 01 Mar 2020 11:00:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1583089245; cv=pass; d=google.com; s=arc-20160816; b=ryOrYfb7B2GLVm8n5nf4OYuGIKZ7d+G8Qkp4wWh2E8cGIzMll15HGz+pL1xeOAujz0 Jd7GjKiWdbW+ywLVBuQ9+ul7BctHPIPW9xf6YjHC/2g7AMdlNQYwtLd7/FctzEXTFYlq W68zAjcGV+205AXM0dx3l6dlrWRf2w/IlyLfzkfGzpXgipPJr03TTdrlpWjbur2+ym03 agTjUydeE4OeMQMLGhLBHuMvtJhMu5kpv/Nx00+PCwvppgox6v82oiGhw8vK39PpoCoM VYexvKzEkmkcUKwnDQZD2Bk1AapuwCgtgcxdsEoNHwzziHPJ4JxfjajzIClx/HaoMbO6 ujiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=kjfw80vTWBspu2fD+JA2L4tqWCiD737cuqITX91FYEM=; b=uAo0ufLR0XVnKE6LSPGuvCpe/n1E/mbk5JZIIpMxFueyrSUCBJhmgd7h+YFeGbVwJN V9Rn9Ko7cTXUkAaAK9ngv/Fb20ZyqK5cNeKST6LUl584eWRQP8gH/H/0tKdB2KfCYXti LwEWEMbmjCgTHW5VXIcJO1ClD39odi2EMaHKUIc39Z3GkQhXSQ6Nj8krcEs4H/W0iBVG Ta5mONeii6WrbfWfb0M6+KpfUxexxQCEI4AwYI9XTUEuxFeAMl5G8meVK1//AMr2k67V guYls2FQxuH4yeAYfisTz6ZVdDOmn/cdkNn4AqRQ4rbOYfFqDgVJa0FRzr12qY2+f2q6 B+Ew== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s64si5017197oig.147.2020.03.01.11.00.33; Sun, 01 Mar 2020 11:00:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726621AbgCATA3 (ORCPT + 99 others); Sun, 1 Mar 2020 14:00:29 -0500 Received: from mail-db8eur05olkn2048.outbound.protection.outlook.com ([40.92.89.48]:33565 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726146AbgCATA3 (ORCPT ); Sun, 1 Mar 2020 14:00:29 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ErXz1CLTSWmr6CH979PGqCBv3/t3aCFYptdllyI9RXnRNbrmerN8tcp/9+0EOozTWEXtCl54gB6jelpf/20h08n+koBv4SDne6Bmnl+zugkchC6uEozmc6r4G4C4fp50Zwgnmx0KDRxmpFj28GiagIrzor9n4CoTmk6A/tspiNeDwofk+BPZYyr0HxunBI7INlFFF4r3ps5dx68o7qCfDamWRNfJpZyKnTVcjdYk1ROgvPLDkOOb2gD6VsudXoZOuKDJQEI4E5tGZ1oI1IKSy/y6BXbq7eGLozfdqFiAJ/w9zBYHiHptd4waR0xqSXueHDUzpmppP/q3rh35+7Nk4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kjfw80vTWBspu2fD+JA2L4tqWCiD737cuqITX91FYEM=; b=MkH3wbORxVSwXzV5925ldtn8RTeUz4FMmMhyiyusknwVsRva/bHlaoImQvV8apMzVDMemJMG6vGLpjuzcxkcFRQPwXNkxYjy+qiDj7qZ95pcTH52iNzX7fhMBSKbUR05HT+ImhduoZf9ZhSXfYdyUeLYB/YYcNEv0g81MXpApWSKqH1y6ss3IrSSnPc9t00MLkA/Ht30ZSGQGiJj9EdUJc1MBFU/wiUHfvp8fad1gGcLDsaSZUufOvY2QUTBNAqo/g+qOvkGDRcB9CpWJUnT8T69MrCuKWqkcWGZfQNJ96vJxPI4eVJwkx5lCwlPcAnomBZAtKoICQJL336gZb5lhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM6EUR05FT011.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::33) by AM6EUR05HT134.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::466) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Sun, 1 Mar 2020 19:00:24 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (10.233.240.56) by AM6EUR05FT011.mail.protection.outlook.com (10.233.241.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14 via Frontend Transport; Sun, 1 Mar 2020 19:00:24 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::1956:d274:cab3:b4dd]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::1956:d274:cab3:b4dd%6]) with mapi id 15.20.2772.019; Sun, 1 Mar 2020 19:00:24 +0000 Received: from [192.168.1.101] (92.77.140.102) by FRYP281CA0011.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.16 via Frontend Transport; Sun, 1 Mar 2020 19:00:23 +0000 From: Bernd Edlinger To: Christian Brauner , Jann Horn CC: Jonathan Corbet , Alexander Viro , Andrew Morton , Alexey Dobriyan , "Eric W. Biederman" , Thomas Gleixner , Oleg Nesterov , Frederic Weisbecker , Andrei Vagin , Ingo Molnar , "Peter Zijlstra (Intel)" , Yuyang Du , David Hildenbrand , Sebastian Andrzej Siewior , Anshuman Khandual , David Howells , James Morris , Kees Cook , Greg Kroah-Hartman , Shakeel Butt , Jason Gunthorpe , Christian Kellner , Andrea Arcangeli , Aleksa Sarai , "Dmitry V. Levin" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] exec: Fix a deadlock in ptrace Thread-Topic: [PATCH] exec: Fix a deadlock in ptrace Thread-Index: AQHV77xesuLGQPzl+kmhVsL8mVFku6g0DNyAgAAI2gCAAAIiAA== Date: Sun, 1 Mar 2020 19:00:24 +0000 Message-ID: References: <20200301185244.zkofjus6xtgkx4s3@wittgenstein> In-Reply-To: <20200301185244.zkofjus6xtgkx4s3@wittgenstein> Accept-Language: en-US, en-GB, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: FRYP281CA0011.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::21) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) x-incomingtopheadermarker: OriginalChecksum:F1E2DADFB87F3E5722B26F1C8E16E40BA050D73CA5A67A78C902CDC7F799E52B;UpperCasedChecksum:5AC9037D1E48F3828D566279DEE5DFFDA1CD73C61C825375B7693AE6B2BC632A;SizeAsReceived:8943;Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [tkmtNNocAgCyma2NjuY0yBEWMx7iLuzJ] x-microsoft-original-message-id: <1b9ef9e3-f422-b357-43ef-d4481659f324@hotmail.de> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: a69af6b2-e90d-4adb-27b6-08d7be12cc77 x-ms-traffictypediagnostic: AM6EUR05HT134: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TAPiAZlN9MbEuKYs6DCa/3ILLU+RrBD7Bt8oKgLzeMZ/8XRY0Bzc1S4tEv3070nQvfdeezqu8J0dkI9SG93miE/BLy3ee4fXGDK+jdeZBh4bNRKhA7WzmQwGwx4K0lqpI8HnnvglJip/YWLM0/tAM9CnnMEIoIjBuhZuKo8HoeIVpcnT4gP1zTLGS48qhjHjsF62Mj/NK2psJCB8YvE2XPPqzsKc2oUWycKreh4KTms= x-ms-exchange-antispam-messagedata: kGNfkcV/0ffinKf5m0MMgD5UrdapCGSTIxHVJ0t7JJqeKJWam1KghAfNnxDD3vLUwqensYGDv/nQ63lYL0+eLwhtasl/ZyI+JztnAOZzTjxM1dJjKASDC//8wC5Nwrmp/hdiamYTP1q3OEoV6G+YJA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: a69af6b2-e90d-4adb-27b6-08d7be12cc77 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2020 19:00:24.8472 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT134 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMy8xLzIwIDc6NTIgUE0sIENocmlzdGlhbiBCcmF1bmVyIHdyb3RlOg0KPiBPbiBTdW4sIE1h ciAwMSwgMjAyMCBhdCAwNzoyMTowM1BNICswMTAwLCBKYW5uIEhvcm4gd3JvdGU6DQo+PiBPbiBT dW4sIE1hciAxLCAyMDIwIGF0IDEyOjI3IFBNIEJlcm5kIEVkbGluZ2VyDQo+PiA8YmVybmQuZWRs aW5nZXJAaG90bWFpbC5kZT4gd3JvdGU6DQo+Pj4gVGhlIHByb3Bvc2VkIHNvbHV0aW9uIGlzIHRv IGhhdmUgYSBzZWNvbmQgbXV0ZXggdGhhdCBpcw0KPj4+IHVzZWQgaW4gbW1fYWNjZXNzLCBzbyBp dCBpcyBhbGxvd2VkIHRvIGNvbnRpbnVlIHdoaWxlIHRoZQ0KPj4+IGR5aW5nIHRocmVhZHMgYXJl IG5vdCB5ZXQgdGVybWluYXRlZC4NCj4+DQo+PiBKdXN0IGZvciBjb250ZXh0OiBXaGVuIEkgcHJv cG9zZWQgc29tZXRoaW5nIHNpbWlsYXIgYmFjayBpbiAyMDE2LA0KPj4gaHR0cHM6Ly9sb3JlLmtl cm5lbC5vcmcvbGludXgtZnNkZXZlbC8yMDE2MTEwMjE4MTgwNi5HQjExMTJAcmVkaGF0LmNvbS8N Cj4+IHdhcyB0aGUgcmVzdWx0aW5nIGRpc2N1c3Npb24gdGhyZWFkLiBBdCBsZWFzdCBiYWNrIHRo ZW4sIEkgbG9va2VkDQo+PiB0aHJvdWdoIHRoZSB2YXJpb3VzIGV4aXN0aW5nIHVzZXJzIG9mIGNy ZWRfZ3VhcmRfbXV0ZXgsIGFuZCB0aGUgb25seQ0KPj4gcGxhY2VzIHRoYXQ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