[linux-next] LinuxNextTracking branch, master, updated. next-20170614

batman at open-mesh.org batman at open-mesh.org
Thu Jun 15 00:15:36 CEST 2017


The following commit has been merged in the master branch:
commit a1a745ef980a1b48299ead4ea7990e62c0516f6e
Author: Andreas Pape <apape at phoenixcontact.com>
Date:   Fri May 19 10:01:42 2017 +0200

    batman-adv: fix memory leak when dropping packet from other gateway
    
    The skb must be released in the receive handler since b91a2543b4c1
    ("batman-adv: Consume skb in receive handlers"). Just returning NET_RX_DROP
    will no longer automatically free the memory. This results in memory leaks
    when unicast packets from other backbones must be dropped because they
    share a common backbone.
    
    Fixes: 9e794b6bf4a2 ("batman-adv: drop unicast packets from other backbone gw")
    Signed-off-by: Andreas Pape <apape at phoenixcontact.com>
    [sven at narfation.org: adjust commit message]
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    Signed-off-by: Simon Wunderlich <sw at simonwunderlich.de>

diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index e1ebe14ee2a6..ae9f4d37d34f 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -987,7 +987,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
 				batadv_dbg(BATADV_DBG_BLA, bat_priv,
 					   "recv_unicast_packet(): Dropped unicast pkt received from another backbone gw %pM.\n",
 					   orig_addr_gw);
-				return NET_RX_DROP;
+				goto free_skb;
 			}
 		}
 

-- 
LinuxNextTracking


More information about the linux-merge mailing list