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=1796384627; b=3G1u2NV0fMrVNDYWe4OfCOyq4+Xgwh0pAlIYcHEs7ccgYEHOZ4Gi98rY0oPTFoR5/p0j 5tTDJQNef9IcYCBilOcablC845er0Z/at01DPWvNlC1PJoZnr37Z7+ymroCtbtq9kARkk f963V4wYRT8Cuk21Sm4B88dlxT+udRuZG2RIMtslEc8z8utfZ3rVpOAQQDwOMoCQp8n4M fxa/HeuyjPTA8hpX32RSvrjYQtuX3dyYriLenJ23NncE8H72DBkOn6K09BGZNixDHJoMa UxURX02wxmNGzs6rtlBV4uNMUmYNwlxhzgcHhOlZAHeHuHZtCKPJ43i5UhLlzLY60jg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384627; 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=O5FqJiZUjEkPZjv1MO8VjkLIRTNOY04AlsbtAIIlRHQ=; b=dgdWmaG0BLCmwAyRyi+5YwKB/7AI65sobbY71dHeLVp3vfCC9iZsG/uhfK+rL80wXp9t 2t57z8qhrNtSJYpLMriUkSpbvxlZy3mC8zodolzwD7CKHJKNMskATLb29sR9AsuTrp3I4 VvciTtioubbqy2ZwXqvN9M1FpI5Uzh6wN4/hiZP7Ax4spzwW+GLsKSY9yXjJju/6qRp/S gztLBwQHkSOsYXXmPKD0+liaXcUPzAasXxRWpgEWDev19zjO+Mmot1UxhspOIaFmt7oKd Y5o2My52o2fDGpAuHeVtqlmz6McL35H00FeC3UaqPK7s0XjCDgDw9tnuUgriZt1pVqg== 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=IdTgh1WK; 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 6BC13606A686; Fri, 4 Dec 2026 11:43:47 +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=IdTgh1WK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A96C1F00933; Fri, 4 Dec 2026 11:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384627; bh=O5FqJiZUjEkPZjv1MO8VjkLIRTNOY04AlsbtAIIlRHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IdTgh1WKn0fN/FCza1wmHunFh/Z3mBWHukCgYJfVcCibYZn4B4HyAZC1ZuX3RZ79L WFMGybITBkxRgpnGVNYefVefV/TwYEHyfrQtReVh6PSIgLIJSxP0YID3/zt1Apxv8M ykcfUF8nIt9s+WjJD+zY3katu4t8sv8suPi821qY= 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.6 0227/1167] af_unix: Remove gc_in_progress check in unix_peek_fpl(). Date: Fri, 4 Dec 2026 18:54:14 +0900 Message-ID: <20261204100707.982087500@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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