batman-adv: fix kernel-doc for functions holding ownership of the skb
Sven Eckelmann
maintainerPATCH 1/1 batman-adv: fix kernel-doc for functions holding ownership of the skb
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 <[email protected]>
--- net/batman-adv/routing.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
net/batman-adv/routing.c +4 -7
@@ -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)
@@ -999,8 +998,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)
@@ -1138,8 +1136,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)
@@ -1383,7 +1380,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)
---
base-commit: e8d6ecd5b27bf4ab6dfef96e01cd0057065ed396
change-id: 20260710-consuming-kernel-doc-ab5015b1448e
Best regards,
Signature · 1 line
Sven Eckelmann <[email protected]>