* [PATCH 0/1] pull request for net: batman-adv 2017-01-25
@ 2017-01-25 16:25 Simon Wunderlich
[not found] ` <20170125162506.12642-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2017-01-26 4:11 ` [PATCH 0/1] pull request for net: batman-adv 2017-01-25 David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Simon Wunderlich @ 2017-01-25 16:25 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
Hi David,
here is a bugfix for net which we would like to have integrated.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit 7ce7d89f48834cefece7804d38fc5d85382edf77:
Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-net-for-davem-20170125
for you to fetch changes up to 4ea33ef0f9e95b69db9131d7afd98563713e81b0:
batman-adv: Decrease hardif refcnt on fragmentation send error (2017-01-04 08:22:04 +0100)
----------------------------------------------------------------
Here is a batman-adv bugfix:
- fix reference count handling on fragmentation error, by Sven Eckelmann
----------------------------------------------------------------
Sven Eckelmann (1):
batman-adv: Decrease hardif refcnt on fragmentation send error
net/batman-adv/fragmentation.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <20170125162506.12642-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>]
* [PATCH 1/1] batman-adv: Decrease hardif refcnt on fragmentation send error [not found] ` <20170125162506.12642-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org> @ 2017-01-25 16:25 ` Simon Wunderlich 0 siblings, 0 replies; 3+ messages in thread From: Simon Wunderlich @ 2017-01-25 16:25 UTC (permalink / raw) To: davem-fT/PcQaiUtIeIZ0/mPfg9Q Cc: netdev-u79uwXL29TY76Z2rM5mHXA, b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org> An error before the hardif is found has to free the skb. But every error after that has to free the skb + put the hard interface. Fixes: 8def0be82dd1 ("batman-adv: Consume skb in batadv_frag_send_packet") Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org> Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org> --- net/batman-adv/fragmentation.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c index 9c561e683f4b..0854ebd8613e 100644 --- a/net/batman-adv/fragmentation.c +++ b/net/batman-adv/fragmentation.c @@ -474,7 +474,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, primary_if = batadv_primary_if_get_selected(bat_priv); if (!primary_if) { ret = -EINVAL; - goto put_primary_if; + goto free_skb; } /* Create one header to be copied to all fragments */ @@ -502,7 +502,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, skb_fragment = batadv_frag_create(skb, &frag_header, mtu); if (!skb_fragment) { ret = -ENOMEM; - goto free_skb; + goto put_primary_if; } batadv_inc_counter(bat_priv, BATADV_CNT_FRAG_TX); @@ -511,7 +511,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, ret = batadv_send_unicast_skb(skb_fragment, neigh_node); if (ret != NET_XMIT_SUCCESS) { ret = NET_XMIT_DROP; - goto free_skb; + goto put_primary_if; } frag_header.no++; @@ -519,7 +519,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, /* The initial check in this function should cover this case */ if (frag_header.no == BATADV_FRAG_MAX_FRAGMENTS - 1) { ret = -EINVAL; - goto free_skb; + goto put_primary_if; } } @@ -527,7 +527,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, if (batadv_skb_head_push(skb, header_size) < 0 || pskb_expand_head(skb, header_size + ETH_HLEN, 0, GFP_ATOMIC) < 0) { ret = -ENOMEM; - goto free_skb; + goto put_primary_if; } memcpy(skb->data, &frag_header, header_size); -- 2.11.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] pull request for net: batman-adv 2017-01-25 2017-01-25 16:25 [PATCH 0/1] pull request for net: batman-adv 2017-01-25 Simon Wunderlich [not found] ` <20170125162506.12642-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org> @ 2017-01-26 4:11 ` David Miller 1 sibling, 0 replies; 3+ messages in thread From: David Miller @ 2017-01-26 4:11 UTC (permalink / raw) To: sw; +Cc: netdev, b.a.t.m.a.n From: Simon Wunderlich <sw@simonwunderlich.de> Date: Wed, 25 Jan 2017 17:25:05 +0100 > here is a bugfix for net which we would like to have integrated. > > Please pull or let me know of any problem! Pulled, thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-26 4:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 16:25 [PATCH 0/1] pull request for net: batman-adv 2017-01-25 Simon Wunderlich
[not found] ` <20170125162506.12642-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2017-01-25 16:25 ` [PATCH 1/1] batman-adv: Decrease hardif refcnt on fragmentation send error Simon Wunderlich
2017-01-26 4:11 ` [PATCH 0/1] pull request for net: batman-adv 2017-01-25 David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox