From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AD7C28E8 for ; Mon, 18 Nov 2024 04:55:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731905732; cv=none; b=Afa86UAME8Wdchp7FV++hjjXInIKxdHCeA4eythx8oUO27nmiRgwRWzG9rhonP+Q/Zn7Sjk5Dto9qRaJJBq5OHPXcpl8HEyyo/ESsgu5e6AWKHBRcgDAxvIyTpMK5lSwtw4M+1oxTqfUMLmgMNvdYllKVEZ9nqz+EJWl/923vcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731905732; c=relaxed/simple; bh=JLdHjcZJU0u6rquREJ2EUrF9NAVM7qlMxeRq3I8W5CM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=HA9dEQuqChlBS4n7SNYo8m7IbiL/wgwMy9HjQ+Z2SKfCg3maxAAl9+Lg0slUwlts2N8kY19LOpmIrVp72LYtSWcv64WvM+zaNFCC8Hiue4pXlCutxyqd4xYtRTKX2qzl+onHBaAVEPgyXlY+0b6qy1ipTNon4o1j2gzcu4GgDGA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aNpHxkku; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aNpHxkku" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21116b187c4so8665435ad.3 for ; Sun, 17 Nov 2024 20:55:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731905730; x=1732510530; darn=vger.kernel.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=o6vY+aSsnuaRE7lvXSjbw/Ba6Iku0uNLInPIFfnHcyo=; b=aNpHxkku3+AMSSp6QcTwG1H2GVA8pn8YhgD07gVusJHnZy9g41Nc80+dM8FQhr1dx6 o8J8S3i4TmsmzwS1Sf5WZTRomim0qcBQ1QyX0XLS2NNaRkkfGZSupOhwJZScNIAYFhs1 p4FovJK1w5ucZyendyWakt+MmnXlnmh/5NtHg5H89tCFfpGY54JzlrV8ii+/SFVoQsLO 6lwszg9DLR/Axvqrrbs+WDMEsqlQcNZo9vWA6lpASs6L5gXNnv8V+ByvYLXPZ3DbI4N4 h4W8yj+q8Fi9HuG7RYxroycTPHniqBSxgegnJSnpC7w9EVwR9l5m29BpHdz90OrohEN8 7nLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731905730; x=1732510530; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o6vY+aSsnuaRE7lvXSjbw/Ba6Iku0uNLInPIFfnHcyo=; b=ERQnob0rMzO2ww7H/Czr4c+nAJAFMPhgV2/tHIbexoCFGZUWJ+kAJI/OziLbRdOqha E02rHpAVGnqQpJNutQGXERKCnuFrwSMbl1UyKzIw1+PpOnW3DTaaBHvvoKZ+wmCMYFgP 4FiPibQx5Cgpji6dxQ2QN9Oi45+LIFAO+C3+BWzhK/ezRPIvMBzK86xvYD0NFlz+EjNZ 4f+fx8J9I6fVnFUGf3Aa2XdYg2FNdu9EVKYjbr+ncQR3phYNTFKMjNi/pFUVtz04NG8U /like+5vzb4zYk+lCHSDqaf3UfPNBFSUWNbf0MG0rKXj1JoBcDd49XU0mo5vJbgw2cgg CErQ== X-Forwarded-Encrypted: i=1; AJvYcCXuLGtFYv86tZ4XKkJPCfPKqzeyKUWbbPe/jAXNot07Gxng02IefnnjnwhCA2FYbUKx/Ops4+E=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3mx7N/NC6StunwOJNME4PafokitsW4eahpEJiczBG5dOkkI0j zcCLDykvR56nDTLV8V367g6omqUG2rc7VhxTsmgG4NRzyGwXSGJcJfaCu+iUaQVFrWT5NBpwADB /WQ== X-Google-Smtp-Source: AGHT+IHfNkRKjo417tJfIU7LMPlBxNgYZAMTEQtF6yehSNTM7uxcN5HgTYUlArPNQeryaO9TJbEX5A== X-Received: by 2002:a17:902:d4cd:b0:211:fb9c:b1ce with SMTP id d9443c01a7336-211fb9cb652mr79229265ad.17.1731905730360; Sun, 17 Nov 2024 20:55:30 -0800 (PST) Received: from darker.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211d0f34f2fsm48187495ad.159.2024.11.17.20.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2024 20:55:29 -0800 (PST) Date: Sun, 17 Nov 2024 20:55:28 -0800 (PST) From: Hugh Dickins To: gregkh@linuxfoundation.org cc: akpm@linux-foundation.org, aha310510@gmail.com, chuck.lever@oracle.com, hughd@google.com, stable@vger.kernel.org, yuzhao@google.com Subject: Re: FAILED: patch "[PATCH] mm: revert "mm: shmem: fix data-race in shmem_getattr()"" failed to apply to 5.10-stable tree In-Reply-To: <2024111703-uncork-sincerity-4d6e@gregkh> Message-ID: References: <2024111703-uncork-sincerity-4d6e@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Sun, 17 Nov 2024, gregkh@linuxfoundation.org wrote: > > The patch below does not apply to the 5.10-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to . > > To reproduce the conflict and resubmit, you may use the following commands: > > git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y > git checkout FETCH_HEAD > git cherry-pick -x d1aa0c04294e29883d65eac6c2f72fe95cc7c049 > # > git commit -s > git send-email --to '' --in-reply-to '2024111703-uncork-sincerity-4d6e@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. For 5.10 and 5.4 and 4.19 please use this replacement patch: >From 98dfa72dd24347bfcbb9a60ac65ad42130ff44f5 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 15 Nov 2024 16:57:24 -0800 Subject: [PATCH] mm: revert "mm: shmem: fix data-race in shmem_getattr()" commit d1aa0c04294e29883d65eac6c2f72fe95cc7c049 upstream. Revert d949d1d14fa2 ("mm: shmem: fix data-race in shmem_getattr()") as suggested by Chuck [1]. It is causing deadlocks when accessing tmpfs over NFS. As Hugh commented, "added just to silence a syzbot sanitizer splat: added where there has never been any practical problem". Link: https://lkml.kernel.org/r/ZzdxKF39VEmXSSyN@tissot.1015granger.net [1] Fixes: d949d1d14fa2 ("mm: shmem: fix data-race in shmem_getattr()") Acked-by: Hugh Dickins Cc: Chuck Lever Cc: Jeongjun Park Cc: Yu Zhao Cc: Signed-off-by: Andrew Morton Signed-off-by: Hugh Dickins --- mm/shmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 8239a0beb01c..e173d83b4448 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1077,9 +1077,7 @@ static int shmem_getattr(const struct path *path, struct kstat *stat, shmem_recalc_inode(inode); spin_unlock_irq(&info->lock); } - inode_lock_shared(inode); generic_fillattr(inode, stat); - inode_unlock_shared(inode); if (is_huge_enabled(sb_info)) stat->blksize = HPAGE_PMD_SIZE; -- 2.47.0.338.g60cca15819-goog From mboxrd@z Thu Jan 1 00:00:00 1970 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 AFD1D14AD2E for ; Tue, 19 Nov 2024 04:36:29 +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=1731990989; cv=none; b=EaIUOsEWfWoYrmnU4uKcyDiOj0xapex6eKASAZ7Zs9oxLw6ZzGvDDRDvNLRY9WmTy2c4VdYsF3cjOpCaBK4vW+7nOTelx5F6KNrxLBDYPZxcQRo3neOkqREkxVon4bMAfORKOYVXmplNtiFBlg2mb8kGKXTf15M7ngw5ibh9cMM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731990989; c=relaxed/simple; bh=YLbOAvQCyOryQxeEp91l4z6TMz9A/22L2P9H5skRI7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rrZBMSlUAKmDhgT5Yiop3Lh6XM5c9nyoucssk/2dONhKkM1Qv0BzfJcozxSdUyWXsaVKF0gUn8RcfrPI0WIONu7HDzadQZDift3M/CM5gpoKCAElyxpzBeXhFmI/J7eBsYIkeJNBY9VPU/9kAwkmmih/CxIbxxui58eiaVQ2mys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZcSacLMa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZcSacLMa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06147C4CECF; Tue, 19 Nov 2024 04:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731990989; bh=YLbOAvQCyOryQxeEp91l4z6TMz9A/22L2P9H5skRI7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZcSacLMaXhhTiPgdGqr0r9U0ZAfwTVnYdZ//0GAVJYAcpA6K+t/kbJkS0pFY3ejBq o+2x6Fp1Anght0WQu8/SVFBNlXwxxV7M/ZtdFJTn0m4PwkyTc+Wqb5HiYywjbMb3Ht BS3pA96f523QND5iXjtqWj/CUvEr8R5Si5iv0FG3ix+HZ1oEE0/a9I0iF/QMUczUax DDILAwPG8ks8W/eb8Y5mAhIiSVOwUStgIVfKBafgk86b0upjmpSTH+9V9k8NXly6/8 ySXu3jH2OrLVtY/effSZNkYZ7GEf5UZMHF/7Mk9IgYtRy+szqpYEMS2p2qqRO6PU0Z OGf4YaVWL1rHw== From: Sasha Levin To: stable@vger.kernel.org Cc: Hugh Dickins , Sasha Levin Subject: Re: FAILED: patch "[PATCH] mm: revert "mm: shmem: fix data-race in shmem_getattr()"" failed to apply to 5.10-stable tree Date: Mon, 18 Nov 2024 23:36:27 -0500 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: <20241119043627.gHJstTy3Wk_motsNNkii3lLZMvzECfe8TNG5Rwg3H4I@z> [ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: d1aa0c04294e29883d65eac6c2f72fe95cc7c049 WARNING: Author mismatch between patch and upstream commit: Backport author: Hugh Dickins Commit author: Andrew Morton Commit in newer trees: |-----------------|----------------------------------------------| | 6.11.y | Present (different SHA1: 285505dc512d) | | 6.6.y | Present (different SHA1: 552c02da3b0f) | | 6.1.y | Not found | | 5.15.y | Not found | | 5.10.y | Not found | |-----------------|----------------------------------------------| Note: The patch differs from the upstream commit: --- --- - 2024-11-18 22:55:31.238709435 -0500 +++ /tmp/tmp.VNf4ys5kLv 2024-11-18 22:55:31.230277300 -0500 @@ -1,3 +1,12 @@ +For 5.10 and 5.4 and 4.19 please use this replacement patch: + +>From 98dfa72dd24347bfcbb9a60ac65ad42130ff44f5 Mon Sep 17 00:00:00 2001 +From: Andrew Morton +Date: Fri, 15 Nov 2024 16:57:24 -0800 +Subject: [PATCH] mm: revert "mm: shmem: fix data-race in shmem_getattr()" + +commit d1aa0c04294e29883d65eac6c2f72fe95cc7c049 upstream. + Revert d949d1d14fa2 ("mm: shmem: fix data-race in shmem_getattr()") as suggested by Chuck [1]. It is causing deadlocks when accessing tmpfs over NFS. @@ -13,21 +22,25 @@ Cc: Yu Zhao Cc: Signed-off-by: Andrew Morton +Signed-off-by: Hugh Dickins --- mm/shmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c -index e87f5d6799a7b..568bb290bdce3 100644 +index 8239a0beb01c..e173d83b4448 100644 --- a/mm/shmem.c +++ b/mm/shmem.c -@@ -1166,9 +1166,7 @@ static int shmem_getattr(struct mnt_idmap *idmap, - stat->attributes_mask |= (STATX_ATTR_APPEND | - STATX_ATTR_IMMUTABLE | - STATX_ATTR_NODUMP); +@@ -1077,9 +1077,7 @@ static int shmem_getattr(const struct path *path, struct kstat *stat, + shmem_recalc_inode(inode); + spin_unlock_irq(&info->lock); + } - inode_lock_shared(inode); - generic_fillattr(idmap, request_mask, inode, stat); + generic_fillattr(inode, stat); - inode_unlock_shared(inode); - if (shmem_huge_global_enabled(inode, 0, 0, false, NULL, 0)) + if (is_huge_enabled(sb_info)) stat->blksize = HPAGE_PMD_SIZE; +-- +2.47.0.338.g60cca15819-goog + --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.10.y | Success | Success |