From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387264; b=nxp6nBLB5oU4z11XcCh9JroTfm7dH3oO1XyicL71CI8hr8unFsBW8T7NIlroyNIoN5kX ovFImJ9SQ/U6IjbDTPOMEPLwVqEvROqkAxj9HL/ykZIUbXLygrN4hRJ7Rvqsq7sx3pgaw i0BUIcnzO1/cYxplPjHufeykvs3ydKw0+zhbDbZLQNT9qEVZVctQrKFtW9P1dduzVRhVK iXFEpP1tolBqe14jRbRGcGqMj3UgpNHCxkkVuprW0+xsB2GUv6mz9FVzY8WgEsAzTh1G8 YFPLZ3w9LLlhLvSF6ZZXcXnF7K7pDxG0sXHwBaRr2oX5vTahejRk3REkVcTImRagcuQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387264; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=P3gvOuqPwE5Ur9CkHYrEuz8s9cv3J5THFvGvbrDj/XE=; b=3KlXxvlgcUgKOst/PN5rHIUQAGsfzivYYnZgDvRQa1S9oK0/tUby9ejYJcXM+WV8OlHM HG13eswLcsayu/E4FGYnn5NYlUi3N7C+tke87zXNuh9qPqSG/0qAr3czM5HSfAM9uD8gf PsMDYMzgf/yYTl7gVN3Yp/ugs9kmKiiJJYs6xLH/spmtdSvlnDvpt+WU3AOeSRtsinLa+ A4/OKa6UNDWPHatoXqPTBSQRqbMwWbcDXNR3k00spsrIeczszBb4R4OQs+7lGd7sBEUwx 9DBcMS3aloMPMuHvBEHrNaXNDxT6xGYd4qokrQlpWZWo0ejc729/ZgvYX/4Ix8lteEg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=N8xSupQ8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 814A0606A322; Fri, 4 Dec 2026 12:27:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=N8xSupQ8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC2C21F000CE; Fri, 4 Dec 2026 12:27:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387264; bh=P3gvOuqPwE5Ur9CkHYrEuz8s9cv3J5THFvGvbrDj/XE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=N8xSupQ8EfF5HaMitIMHXTpDW80WxlzpvM+IomExF3/Z56ctHsuVIdALnx0UZiSaD fvm/5EkHdVfCS1Hs0uzOD+hFibcE1THmDInTY7PL2Pi5KcUy/QGEMO1q7pmBNmB+1I uFyvQ2CvAIztbXfN0AVtRyE3z4bY2pVCfCkXUdOU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Qihang Tang , Kuniyuki Iwashima , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 0172/1059] af_unix: Remove gc_in_progress check in unix_peek_fpl(). Date: Fri, 4 Dec 2026 18:55:03 +0900 Message-ID: <20261204100648.699417187@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kuniyuki Iwashima [ Upstream commit 0edbc945eb9edd0086f25b151a79cfe4adc0dfa8 ] unix_vertex_dead() and unix_peek_fpl() are synchronised with unix_peek_seq to prevent GC from purging a live socket's recvq. unix_peek_fpl() skips the synchronisation if gc_in_progress is false. However, on weakly ordered arch, GC might have already started working while the write to gc_in_progress is buffered. This does not occur on x86. This is an unlikely path that happens only when AF_UNIX fd is peeked so not worth complicating. Instead of adding memory barriers in unix_gc() and unix_peek_fpl(), let's simply remove the broken short-circuit. Fixes: e5b31d988a41 ("af_unix: Give up GC if MSG_PEEK intervened.") Reported-by: Qihang Tang Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261104162858.991930-1-kuniyu@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/unix/garbage.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 338769200065e..9c1afd8507c57 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@ -317,9 +317,6 @@ void unix_peek_fpl(struct scm_fp_list *fpl) if (!fpl || !fpl->count_unix) return; - if (!READ_ONCE(gc_in_progress)) - return; - /* Invalidate the final refcnt check in unix_vertex_dead(). */ spin_lock(&unix_peek_lock); raw_write_seqcount_barrier(&unix_peek_seq); -- 2.53.0