From nobody Mon Feb 9 13:46:26 2026 Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [185.226.149.38]) (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 4D3FA2627EA; Wed, 9 Apr 2025 12:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.226.149.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744203137; cv=none; b=RtAC1GBlN0VZJhQ5k3BNTHmmDoDt3OW5EBZylK24mXNDtDwKzMwbs2/t4OaAuiFy9zEbSTLter3NXG4Efd3Hvk+OXElkf9OI8M40sxgTqUctFjRQbfTIXRpx+LWMtM0eVcNi0dL0cWmE6YgQbC2VL3ogRu1WRqDQ/qykYKC7BUI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744203137; c=relaxed/simple; bh=Wga7NfE5EOLKXNPpGWNCl75SXWhKLrcAiVKGdRIqwI8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=S6IymdbBbA8bjiE5/n/WKSqxwf+K4gfbW+fd7oAaCSEdbrWHwA+yV5JScwO+G3BxxmBnLFBqFFaxfK3HNA1bKFR5ox1t5vdE9Vv8r49PkWYI0KzFb3VH820Dvl0VB9qiabVyj6Nmuj51s9LqA7sZUdDzFvdsId19qPACHqWc5Rw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; dkim=pass (2048-bit key) header.d=rbox.co header.i=@rbox.co header.b=bO3gSMGV; arc=none smtp.client-ip=185.226.149.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rbox.co header.i=@rbox.co header.b="bO3gSMGV" Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1u2UuO-0009cr-7G; Wed, 09 Apr 2025 14:52:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From; bh=f8y5kARShR5ZLHXs9fSAYU7oghihWo6U0sGdj42AVuw=; b=bO3gSMGVQs62Kc9g60sAUfmuGj yV5w2IXK7bndM+9Q9OgJCsQbMWEJK55eaWfCdXoPtodwc2+Prh/ud1GqN09+2Qkamzo/h+Ej9w0zk Z9HfRv0DBHzzhENH64a65Ho9pkhWzhR9U4BwKBq1Ni95KLsEXHhf4ISDuLCK7dB+4tczkZ1BKcbjU kSFmpUXTfNqzUHSclNEbrl2dNDyRBEhm7N+pF1P9RZdx0hbi3z5nURjKRSwGC5VFlR8qlelWyni32 bhIXGcgT4akapkAg+PubdrNyaWsMzLyyy/SI95MjvGystZpnOlVMVDB0ywiOKycPJQ8opLpFnB1H5 k6YwmlZw==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1u2UuD-0003GE-PE; Wed, 09 Apr 2025 14:51:54 +0200 Received: by submission02.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1u2Uts-0021Ze-Ld; Wed, 09 Apr 2025 14:51:28 +0200 From: Michal Luczaj Date: Wed, 09 Apr 2025 14:50:58 +0200 Subject: [PATCH net-next] af_unix: Remove unix_unhash() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250409-cleanup-drop-unix-unhash-v1-1-1659e5b8ee84@rbox.co> X-B4-Tracking: v=1; b=H4sIADFt9mcC/x2MQQqDMBAAvyJ77kKMNtB+RXpIs1uzIGtItATEv xu8DMxh5oDCWbjAuzsg81+KrNqkf3QQoteZUag5WGOfZjQOw8Je94SU14S7Sm2IvkR0diAavoF eo4OWp8w/qfd6AuUNlesGn/O8ACHfB5J0AAAA X-Change-ID: 20250406-cleanup-drop-unix-unhash-623dd3bcd946 To: Kuniyuki Iwashima , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Michal Luczaj X-Mailer: b4 0.14.2 Dummy unix_unhash() was introduced for sockmap in commit 94531cfcbe79 ("af_unix: Add unix_stream_proto for sockmap"), but there's no need to implement it anymore. ->unhash() is only called conditionally: in unix_shutdown() since commit d359902d5c35 ("af_unix: Fix NULL pointer bug in unix_shutdown"), and in BPF proto's sock_map_unhash() since commit 5b4a79ba65a1 ("bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself"). Remove it. Signed-off-by: Michal Luczaj Reviewed-by: Kuniyuki Iwashima --- net/unix/af_unix.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index f78a2492826f9cc1e302ee6f8ca93c367656670a..2ab20821d6bb244a09e0364e1c6= 49042360e23b1 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -950,13 +950,6 @@ static void unix_close(struct sock *sk, long timeout) */ } =20 -static void unix_unhash(struct sock *sk) -{ - /* Nothing to do here, unix socket does not need a ->unhash(). - * This is merely for sockmap. - */ -} - static bool unix_bpf_bypass_getsockopt(int level, int optname) { if (level =3D=3D SOL_SOCKET) { @@ -987,7 +980,6 @@ struct proto unix_stream_proto =3D { .owner =3D THIS_MODULE, .obj_size =3D sizeof(struct unix_sock), .close =3D unix_close, - .unhash =3D unix_unhash, .bpf_bypass_getsockopt =3D unix_bpf_bypass_getsockopt, #ifdef CONFIG_BPF_SYSCALL .psock_update_sk_prot =3D unix_stream_bpf_update_proto, --- base-commit: 420aabef3ab5fa743afb4d3d391f03ef0e777ca8 change-id: 20250406-cleanup-drop-unix-unhash-623dd3bcd946 Best regards, --=20 Michal Luczaj