Article View: linux.kernel.netdev
Article #21174[PATCH net-next 02/15] batman-adv: mcast: use mla_lock also during mcast_free
From: Simon Wunderlich
Date: Mon, 23 Nov 2026 17:18
Date: Mon, 23 Nov 2026 17:18
32 lines
10018 bytes
10018 bytes
From: Sven Eckelmann <sven@narfation.org> While it is technical ok to not hold the mcast.mla_lock when calling batadv_mcast_mla_tt_retract() in batadv_mcast_free(), it is more clear to always require the lock when calling batadv_mcast_mla_tt_retract(). This strict + simple rule will later make it also possible to check the lock requirements automatically via the LLVM/clang CONTEXT_ANALYSIS. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> --- net/batman-adv/multicast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c index 415981fe6dc6..703f61955083 100644 --- a/net/batman-adv/multicast.c +++ b/net/batman-adv/multicast.c @@ -2184,8 +2184,9 @@ void batadv_mcast_free(struct batadv_priv *bat_priv) batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_MCAST_TRACKER, 1); batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_MCAST, 2); - /* safely calling outside of worker, as worker was canceled above */ + spin_lock(&bat_priv->mcast.mla_lock); batadv_mcast_mla_tt_retract(bat_priv, NULL); + spin_unlock(&bat_priv->mcast.mla_lock); } /** -- 2.47.3
Technical Details
Message-ID:
<20261123171827.3294525-3-sw@simonwunderlich.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369601-linux-kernel-netdev=dewy.ruReferences:
<20261123171827.3294525-1-sw@simonwunderlich.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369601-linux-kernel-netdev=dewy.ru From: sw@simonwunderlich.de (Simon Wunderlich) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next 02/15] batman-adv: mcast: use mla_lock also during mcast_free Date: Mon, 23 Nov 2026 18:18:14 +0100 Organization: Usenet Network Message-ID: <20261123171827.3294525-3-sw@simonwunderlich.de> References: <20261123171827.3294525-1-sw@simonwunderlich.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3937299"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:fQQWNxUsNKQzthFRcR213p6g73k= sha256:h9pbdjd/BHMEiFUrlc3Ayxrizis3kKD+5OZJX4NJhkw= sha1:vd5qKBnJxUml0wYLmwyO1uQetLI= sha256:KMqkIgOOtOukx+ZtJ+pozwOpVxayaN7N+nu4JyL8pH0= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 6FCEE125DC0; Mon, 23 Nov 2026 20:19:04 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=simonwunderlich.de X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UdLIUvLgXuY0; Mon, 23 Nov 2026 20:19:01 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-369601-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=simonwunderlich.de X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 760B9125DC3; Mon, 23 Nov 2026 20:18:48 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 544D32730A; Mon, 23 Nov 2026 17:18:44 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795454322; b=fMGsnC6E2oSpYuBD3eCRN7TOe/Xnxep0mJnwj8EC+IxTCGl5ZOGD2cQURbRu0juyrTlE zAa3IAoUdis3WDd8PC9LWJEFGQCvAX9/13Ug/9megJsB+XiesstpZi6JuprAAHO6Kg9Qg KoUbnZBFBe3bTHaotW2tJLX+eyibeeb1v+WK6umV+YGeIhoj734XLtqk/PaO5gPP0ikjj eDwy7zhFn0wI9sC3C7r+gbVetuz4LXn02hAF0wfB7UnZKAgY0dO9Y2XrXRnFqCMpEBQtB zoiSeLWO3Rz7O6yk8qd626OB4FJBI1cr/jt/Q8E9DNvwjB+EHQK6xKhpNl8FeZA2Ccw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795454322; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=61uMj0sUvajsGIc4hbK6/2n/ENBq0us5BtBioYyKYo4=; b=oCd5EhAxbprsvs8T+FPYuUxNDt9JAxv3i3vHhTzKjPll79HczjI5AebV9Xy4xZR28H1u 3+KoT4FAufs9admUFGKcWqgLyVnM1ZRUy+BqrDMugY4WjnkSHX+J7LxJifpjOziZCH0a9 Ipxv2vUZVlAAmjletgQdygC8SiGPCWJKkEQGtB8l2ryPGbaWgymYIJlZC4z0spRbXikCk s6OyrZ7iLB/PMkLncFuCsWR1kSruNEzmNp4VxIq9E3ZhP0dYAViccgFglR8l0Q0UcK8o+ AyNinbe+y61tP7KeyoDOHEqmIjmRiV7Z1Hdc+dXwGtbhRvZEOBgI4UpoxUy1BEGNgBg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=fSbzlS85; dmarc=pass header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89BFB606A687; Mon, 23 Nov 2026 17:18:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=fSbzlS85 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.88.38.48 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795454321; b=k0AWWfu5XRZDlz0sefYWu+2NF+fB7iTEcnl0mNKjbEe/ldaQVobwuVLFRbQ6mBrDFsPY xUZhNTpyCBGLklcMMjTbBdvMzb3wuCpXYcKdBIgNxnkQ5V0Vu8EB0IX6uFikmcvGJtXws DF0haaoTCtXZ3uyPQ4Fa9ouXjRqTuJSMkaEq7RPP4CiDcRMOiGuYQStLkopAagjzETv0Z JsALhPubOBa26aekUTWoARTvUw0v5iTj09vz8R4idM5dtQ5UEarx/5TcmODm2fea6fvD1 HOi2Z8c58X5AiEf+Nlc956cB+/MMTngfAgN8Z0M2G635H/gP4Oa1xEqhOGSFtf0mq/Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795454321; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=61uMj0sUvajsGIc4hbK6/2n/ENBq0us5BtBioYyKYo4=; b=VlaawP6jBzfDP+OV0Cy6uHitH9vwLuuF1qDNYC2ecGfG8V2hpJZ4VnXw5CBeQeiXVVEJ uIPQZ3Rv4wCS+NPNgzwVLRsB+d+KjgBnFIkpL6UnZoigyIAx6b5ardx7bgQq7WBSKTmYG ekxAFRDbtOhBjer7wJHJqQIsUddElLanT/KnJSJn7s7Ge1RyBP2rwYjeTs9mAetj3larC +jyzdZBxX/vCgi4OSV/vaBdHrxbMyer/lDeZ++EM0e7towk74Sk8GELLFyOS+NpIi1GVg GJLfYw0QkhF6bH2e6JuNjmyTtu4Tjof4OC/qdKyF7ify3Cy3OjfVHAP90MZbroUWjoQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=fSbzlS85; arc=none smtp.remote-ip=23.88.38.48 X-Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id 3D956606A334 for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 17:18:41 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3D956606A334 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=simonwunderlich.de X-Received: from kero.packetmixer.de (p200300c59714c2E05A704819B6bA2DB4.dip0.t-ipconnect.de [IPv6:2003:c5:9714:c2e0:5a70:4819:b6ba:2db4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with UTF8SMTPSA id 5D2D7FA264; Mon, 23 Nov 2026 18:18:33 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1795454313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=61uMj0sUvajsGIc4hbK6/2n/ENBq0us5BtBioYyKYo4=; b=fSbzlS85KrQN9fPaljyZS+1AuCfu3UbGT3TvUSyCGP9qaY6ZjaIdIviO0gCFvLiase7sGl QGgIR4xGFLXqJ+JIxgH97bh35tLfArWdKdLCR6wB2h6pKYRNWf/h+efsb0XhWYK86dFKej A7Gpa/jiQeKRTEw8/uXdYwJCD10zTo6yDXEorm9TGVkq5+8DZWleXuUm0tvV//9SBoy2QT t/b1MTS+D/1XxrX/Atux+Hs0ffuLFflMe70Km3IhDGhlJR2E51cgLkac8T+V/sMiXjshZn 4r4z/TSe1ZuWsHkLLDeLjqn1NcJDED9ssSiETi7kgwTyA/CLuHCrxgWAtUbizA== X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, b.a.t.m.a.n@lists.open-mesh.org, Sven Eckelmann <sven@narfation.org>, Simon Wunderlich <sw@simonwunderlich.de> X-Mailer: git-send-email 2.47.3 X-In-Reply-To: <20261123171827.3294525-1-sw@simonwunderlich.de> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list