Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48]) (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 7CD1E243956 for ; Tue, 28 Jul 2026 13:39:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=23.88.38.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785245973; cv=none; b=LhBZDhVas//CjcDsOpHZV4YiT7pgKnPfuZV7mqeHM+HjLXK9U0QdPFS7uRzezmr+YiD0KwLsGPywMHx1lE5B1Ls5BiigvzoCwzCCV6iX6CAwJ6qeWvjqG6jQDZmAlSirURTlit/IqfPBkxebkPEqp6bl964+VLc/GinQmDgpo7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785245973; c=relaxed/simple; bh=TBN4nUF1j62EXOIP2svEY51s2M07XJqkurdga4yI8MM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ucwMUaUH1QbLk5nT1ggAK6XqcP3b+d91zC+1kMN1KOPnKYSB35OwsogmPTGhmy3jWZeSSlLJOY2eBdkkYyVZ27TBYZRbQwA3LPTyEe+EBwtxNmI8P3hJAGo36y5kkFZuBbvg4H1IJn3CjRXjmi07fCw/Gq6346nVb9BgfiQuOHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; dkim=pass (2048-bit key) header.d=simonwunderlich.de header.i=@simonwunderlich.de header.b=ganPSHqB; arc=none smtp.client-ip=23.88.38.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=simonwunderlich.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=simonwunderlich.de header.i=@simonwunderlich.de header.b="ganPSHqB" Received: from kero.packetmixer.de (p200300c59717ead808f168C97E5563A8.dip0.t-ipconnect.de [IPv6:2003:c5:9717:ead8:8f1:68c9:7e55:63a8]) (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 ESMTPSA id E1968FA13B; Tue, 28 Jul 2026 15:39:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1785245967; 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=7mVER+EO0Pv/Hgxr4Rmu78cpub2jN3J8Axcr5+kRgpc=; b=ganPSHqBM1PtfG62hhaNtmAVNPaZULdb2FINKpnaeMEsyEPWayBblOEO6opIVV3kK3NKNo qCXyOqpIUKO1v7hWpyjCBdygntv0JXKeLhHM447Doo/7Kt+BoJDW7WraVMgIlN5Lnom34o ou36n/61cfso4KkjMUHPiBj/d/N1YH/RrRRVRu0ZYonklbX2gzQ1wxM1+WuEOKm3T7tgbP BrMhJgR2Ew6zcQHw2k0NzlQz5PDtg/tPsAxMBJtDP4oo97clzMs8YZfu8+R3P2XuKU6qVF 6MH/ptZpzpsD/wYs+alJQwD/qGEIakwG1ryqtvUT4EQZlJAWO1/EEXRCYKSKog== From: Simon Wunderlich To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , b.a.t.m.a.n@lists.open-mesh.org, Sven Eckelmann , Simon Wunderlich Subject: [PATCH net-next 10/15] batman-adv: fix kernel-doc for functions holding skb ownership Date: Tue, 28 Jul 2026 15:39:13 +0200 Message-ID: <20260728133918.643267-11-sw@simonwunderlich.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260728133918.643267-1-sw@simonwunderlich.de> References: <20260728133918.643267-1-sw@simonwunderlich.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Sven Eckelmann Most functions in batman-adv will take the ownership of an skb when they receive it as argument. Their NET_RX_DROP return value is only indicating whether there was direct visible problem while processing it. The caller must not try to also free the skb when such a negative return code was received. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/routing.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index b0b6c5ca210a2..c1114ee575478 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -263,8 +263,7 @@ static bool batadv_skb_decrement_ttl(struct sk_buff *skb) * @bat_priv: the bat priv with all the mesh interface information * @skb: icmp packet to process * - * Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP - * otherwise. + * Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure */ static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv, struct sk_buff *skb) @@ -986,8 +985,7 @@ static bool batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, * @skb: unicast tvlv packet to process * @recv_if: pointer to interface this packet was received on * - * Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP - * otherwise. + * Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure */ int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb, struct batadv_hard_iface *recv_if) @@ -1120,8 +1118,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb, * @skb: unicast tvlv packet to process * @recv_if: pointer to interface this packet was received on * - * Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP - * otherwise. + * Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure */ int batadv_recv_unicast_tvlv(struct sk_buff *skb, struct batadv_hard_iface *recv_if) @@ -1177,7 +1174,7 @@ int batadv_recv_unicast_tvlv(struct sk_buff *skb, * the assembled packet will exceed our MTU; 2) Buffer fragment, if we still * lack further fragments; 3) Merge fragments, if we have all needed parts. * - * Return: NET_RX_DROP if the skb is not consumed, NET_RX_SUCCESS otherwise. + * Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure */ int batadv_recv_frag_packet(struct sk_buff *skb, struct batadv_hard_iface *recv_if) @@ -1365,7 +1362,7 @@ int batadv_recv_bcast_packet(struct sk_buff *skb, * contents of its TVLV forwards it and/or decapsulates it to hand it to the * mesh interface. * - * Return: NET_RX_DROP if the skb is not consumed, NET_RX_SUCCESS otherwise. + * Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure */ int batadv_recv_mcast_packet(struct sk_buff *skb, struct batadv_hard_iface *recv_if) -- 2.47.3