Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2920389lqp; Mon, 25 Mar 2024 13:07:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVH7mQlNJ5ePCiumdBPGGPaUO0Lw1r+iE0UUBDd7fg31WXA7QBRdaK84u7BFtzOD2Yw2RAvbX+8AqJ00p79xJfkcTCOVM+u8fM2XsPa9w== X-Google-Smtp-Source: AGHT+IGHrpdeXLBJDwKDQAf6AtiUsiNkZmgq8bwUQrbuR8ehX4ep0NkSysSSGvivq1cpFzHrMU74 X-Received: by 2002:ac2:4d95:0:b0:513:5bdb:10f7 with SMTP id g21-20020ac24d95000000b005135bdb10f7mr5128731lfe.14.1711397229205; Mon, 25 Mar 2024 13:07:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711397229; cv=pass; d=google.com; s=arc-20160816; b=ep6nmbvxtMH9kMECFq5Bk0VSQGKiTLqk6cF/qbYE7l2ZttmXAK/4GpGsNdyXF9sig5 z7oD+SMDvHohjH9GR+lAkQpY/vPjiTpR6ZJhy2/ZK28D/oG7qGGugBoWMswFURoj4/BC TYtjIvKQVoF38ukFC2mNbR0RdSKuGIAntdNxqiW5EOLKuf/hhYu9cUuruHdfoSMsdQ6t y9fO2Cfk8GstasxhIiif+FTJwSaHkZMlU8sbrc575rvf5Zgnv+j9cM+yNsWGUkogHDRN Yoi7REsHmD/qVE7rILR00sa3z2QYc8JOoVHHaoEE/cxX2xm59P9cYl3kJ7gzx8CPXHt+ DJ2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=49sTV9UKngmfhYwD5CEOX5ZtH61Lre18fbhuxSFrU4c=; fh=i5onM3Ws11Eosh/zkLzrTxX8G42PeiypnFsl8B4x3og=; b=MkpAFaZ8Iovje+qqczzCwQFwj6X43KIhAZdHk4ToIysLA7A7HlK3PaMMp1LUxSKRgJ hVNMeCq+cgANXuEKqbs6TmKOlyYW7fk1k/ldET/aEQKw+X+s8G3spbFjpU9CWfdJ0ctL +mehHv7+krhytGPEmkHBHvF2Rab131mgJNiDqU3bEwq05/1PU/kAAuAY6lFvq/uLp/oI RCQ6ZAOEJUfVunzfSs+EWdDZPCJdLA1APnz7UMXTSHWhUF1+BgL26X9PQNfca0x6xfNJ 0xM8gGfeVSp3fOENggtnixLybyQ4y8mJWkrR7+4o2wkacmsQxKPJnXBNiY0Q2B6PK7Ms ehag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=a9mXK77w; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-117884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117884-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gf25-20020a170906e21900b00a46caa13e68si2741065ejb.327.2024.03.25.13.07.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 13:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=a9mXK77w; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-117884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117884-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0EE0B1FA37AC for ; Mon, 25 Mar 2024 20:05:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47D6E4CB23; Mon, 25 Mar 2024 20:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a9mXK77w" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AE90487AE; Mon, 25 Mar 2024 20:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711397068; cv=none; b=aLFENKEhPFGChM/q6MEub9Htbn16srfWSdXYGfCxVzYsk9a4Er/8FCcVAJSazmFmU8Z6fhP0Kexl5cnYH04+zIHLNbPZm6U0xAXEgSAKTfL8oU92K9UrEHyM3J7onLJ/hOW5GZ2pKEKrbGo9jwVkO2Wyyv7/MEEf5USQzLGRs9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711397068; c=relaxed/simple; bh=MVqf+1W2/O29sWIHzizwdV/AJ1AIoW9I4gu/EhMFulc=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=SwHrLFjcowG63pbTxrDgXU3ptw5uTr5RCfZk8sJoX9+DNHp55AzTJdps6zzpXrESn9EGMePeRZ+PIqv8vKw8Omynq/K1FDrFr8nC8Q0KiaBqohrOUjyHKcR3BNr0bq5NyNEQ1LohqaalCcGxsvLc6V0mqHk1oshNh3qrBQcJPBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=a9mXK77w; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC570C433F1; Mon, 25 Mar 2024 20:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1711397067; bh=MVqf+1W2/O29sWIHzizwdV/AJ1AIoW9I4gu/EhMFulc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a9mXK77waDCkVLz4nDbjGRzZeFm29rSR7jtobIf3ZvNDfIRcIhhPbuCRNaJP/3P0W gcTK7QJUkpnGxXLy5TOAUUQOEKnyDJyCTsH6VIu2p+QiEeAjXLLswIFVFV6I5Vs3F7 xXliFaODWHltJW/IvV8nIyTZ8paI73yzBlZ4Izl0= Date: Mon, 25 Mar 2024 13:04:26 -0700 From: Andrew Morton To: Edward Liaw Cc: linux-kernel@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jann Horn , linux-kselftest@vger.kernel.org, kernel-team@android.com, Lokesh Gidra , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, Peter Xu Subject: Re: [PATCH v3] selftests/mm: Fix ARM related issue with fork after pthread_create Message-Id: <20240325130426.fba5287fcc437475123e76cc@linux-foundation.org> In-Reply-To: <20240325194100.775052-1-edliaw@google.com> References: <20240325194100.775052-1-edliaw@google.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 25 Mar 2024 19:40:52 +0000 Edward Liaw wrote: > Following issue was observed while running the uffd-unit-tests selftest > on ARM devices. On x86_64 no issues were detected: > > pthread_create followed by fork caused deadlock in certain cases > wherein fork required some work to be completed by the created thread. > Used synchronization to ensure that created thread's start function has > started before invoking fork. hm, you cc'ed the whole world apart from peterx. Fixed. > Signed-off-by: Lokesh Gidra > [edliaw: Refactored to use atomic_bool] > Signed-off-by: Edward Liaw I'll add cc:stable. For which a Fixes: is desirable. I used 760aee0b71e3 ("selftests/mm: add tests for RO pinning vs fork()"), please check that.