From patchwork Sun Aug 8 02:07:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nadav Amit X-Patchwork-Id: 12424639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12FB8C4320A for ; Sun, 8 Aug 2021 02:07:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 88B0E60ED6 for ; Sun, 8 Aug 2021 02:07:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88B0E60ED6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C9DC86B006C; Sat, 7 Aug 2021 22:07:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C27E86B0071; Sat, 7 Aug 2021 22:07:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA0826B0073; Sat, 7 Aug 2021 22:07:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 8DAD66B006C for ; Sat, 7 Aug 2021 22:07:50 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2D1411F37F for ; Sun, 8 Aug 2021 02:07:50 +0000 (UTC) X-FDA: 78450277500.31.F619EEA Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by imf02.hostedemail.com (Postfix) with ESMTP id BA464700F25F for ; Sun, 8 Aug 2021 02:07:49 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id ca5so22459096pjb.5 for ; Sat, 07 Aug 2021 19:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wMm/Odyk8MGDnKiGamL4nyRlCLtI3xfxJNTo+Yg9PlE=; b=EuDxBQf33n+JRr0xqbTGg4xkRIWSfJ70s9rmSi7wQGDsaOueK3rIJeDy3xmWbli+D6 VtHnyLVlvGS1cysKLBJ12XBJQYUFhnyKejdqDXPQeQgmJRO8tlWhXjKmDh4mYhsC75k2 FABvjEGyWU85TGM+FrMTM6CbxgKNnG5rS4pxXme3xLZBpSu0v0Mpt9sY5V6XkyPGxDw4 uKl5G+456gzkBMkcZFDYMY+f3qmUeUhm4GvL/pJhGBj82zZNcW659iIXNlp7xVAQdxqh Bh42VdxZBGm/avJdK/s4/WLJY1ggy2qMokOBmF5U5EpOiO6C36Qg+donEit8FrYqmTP+ dWiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wMm/Odyk8MGDnKiGamL4nyRlCLtI3xfxJNTo+Yg9PlE=; b=U8JUK9vtwwkC83a+Ba+byYhjTSg0K9EAfpUdGUg42CXyKNVqZd5gbwc+18cU2Z7ihS 5onPBhMKBZsQwS58ESK50OQEJ0/bgmKVbLV/W6yO0D8uKyrkChrzv6wBQ/Cl421rThKP /s3buyZDegv5N3uEQh4IGmz4pkACPIv/IwJxpDol4qgUchvQNe90ZyzzmkZFF3DQJJ8D l1DrePXdVpB5acv8rafJWmVCGPQfo00RXpx15uzbq1RjXkcwBHYHlx61rYawNWBGlIg1 EkgWy5iT1v1eEKpt7g8jIFx4XsU4JSo7XmKkDkEfv4qs/ddFWWuQRR76XYb03B+Ux6E2 qDnQ== X-Gm-Message-State: AOAM532UKOnpGRFWKTKH3d7fHNJKr4QkixXwHQMvQZcOGMAdjIwCors0 8yTTT3/MHioFfGBEcACkbJ4= X-Google-Smtp-Source: ABdhPJzgr+BfBh1UqcqF4K/vxCfukmJeGKuNvZHod9NLrn5C6b07IB8Om8kcZJgFWYm7I4VBmSpqYA== X-Received: by 2002:a63:120e:: with SMTP id h14mr220165pgl.215.1628388468489; Sat, 07 Aug 2021 19:07:48 -0700 (PDT) Received: from sc2-haas01-esx0118.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id o18sm3987432pjp.1.2021.08.07.19.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 19:07:47 -0700 (PDT) From: Nadav Amit X-Google-Original-From: Nadav Amit To: Andrew Morton Cc: Pavel Emelyanov , Mike Rapoport , Peter Xu , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Nadav Amit Subject: [PATCH 0/3] userfaultfd: minor bug fixes Date: Sat, 7 Aug 2021 19:07:21 -0700 Message-Id: <20210808020724.1022515-1-namit@vmware.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=EuDxBQf3; dmarc=pass (policy=none) header.from=gmail.com; spf=none (imf02.hostedemail.com: domain of mail-pj1-f54.google.com has no SPF policy when checking 209.85.216.54) smtp.helo=mail-pj1-f54.google.com X-Stat-Signature: o9zjt8yg71c4uee48dcrwgtirm76a6i6 X-Rspamd-Queue-Id: BA464700F25F X-Rspamd-Server: rspam01 X-HE-Tag: 1628388469-931207 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Nadav Amit Three unrelated bug fixes. The first two addresses possible issues (not too theoretical ones), but I did not encounter them in practice. The third patch addresses a test bug that causes the test to fail on my system. It has been sent before as part of a bigger RFC. Nadav Amit (3): userfaultfd: change mmap_changing to atomic userfaultfd: prevent concurrent API initialization selftests/vm/userfaultfd: wake after copy failure fs/userfaultfd.c | 116 +++++++++++------------ include/linux/userfaultfd_k.h | 8 +- mm/userfaultfd.c | 15 +-- tools/testing/selftests/vm/userfaultfd.c | 13 +++ 4 files changed, 82 insertions(+), 70 deletions(-)