kernel-hacking-2024-linux-s.../net
Martin KaFai Lau 903ce4abdf ipv6: Fix mem leak in rt6i_pcpu
It was first reported and reproduced by Petr (thanks!) in
https://bugzilla.kernel.org/show_bug.cgi?id=119581

free_percpu(rt->rt6i_pcpu) used to always happen in ip6_dst_destroy().

However, after fixing a deadlock bug in
commit 9c7370a166 ("ipv6: Fix a potential deadlock when creating pcpu rt"),
free_percpu() is not called before setting non_pcpu_rt->rt6i_pcpu to NULL.

It is worth to note that rt6i_pcpu is protected by table->tb6_lock.

kmemleak somehow did not report it.  We nailed it down by
observing the pcpu entries in /proc/vmallocinfo (first suggested
by Hannes, thanks!).

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Fixes: 9c7370a166 ("ipv6: Fix a potential deadlock when creating pcpu rt")
Reported-by: Petr Novopashenniy <pety@rusnet.ru>
Tested-by: Petr Novopashenniy <pety@rusnet.ru>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Petr Novopashenniy <pety@rusnet.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-05 14:09:23 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25 AX.25: Close socket connection on session completion 2016-06-18 20:55:34 -07:00
batman-adv batman-adv: Clean up untagged vlan when destroying via rtnl-link 2016-06-29 04:01:48 -04:00
bluetooth
bridge ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output 2016-06-30 09:02:48 -04:00
caif
can
ceph
core net_sched: fix mirrored packets checksum 2016-07-01 16:19:34 -04:00
dcb
dccp
decnet net: fix decnet rtnexthop parsing 2016-07-05 14:08:47 -07:00
dns_resolver
dsa
ethernet
hsr
ieee802154
ipv4 ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output 2016-06-30 09:02:48 -04:00
ipv6 ipv6: Fix mem leak in rt6i_pcpu 2016-07-05 14:09:23 -07:00
ipx
irda
iucv
kcm kcm: fix /proc memory leak 2016-06-22 16:32:23 -04:00
key
l2tp l2tp: fix configuration passed to setup_udp_tunnel_sock() 2016-06-08 11:11:53 -07:00
l3mdev
lapb
llc
mac80211 mac80211: Fix mesh estab_plinks counting in STA removal case 2016-06-28 12:39:50 +02:00
mac802154
mpls
netfilter netfilter: nf_tables: fix a wrong check to skip the inactive rules 2016-06-15 12:17:24 +02:00
netlabel
netlink
netrom
nfc
openvswitch openvswitch: fix conntrack netlink event delivery 2016-06-29 08:13:59 -04:00
packet packet: Use symmetric hash for PACKET_FANOUT_HASH. 2016-07-01 16:07:50 -04:00
phonet
qrtr
rds RDS: fix rds_tcp_init() error path 2016-07-04 16:09:49 -07:00
rfkill
rose
rxrpc rxrpc: fix ptr_ret.cocci warnings 2016-06-07 15:30:21 -07:00
sched net_sched: fix mirrored packets checksum 2016-07-01 16:19:34 -04:00
sctp net: diag: add missing declarations 2016-06-10 23:22:55 -07:00
sunrpc rpc: share one xps between all backchannels 2016-06-15 10:32:25 -04:00
switchdev
tipc tipc: fix nl compat regression for link statistics 2016-07-01 16:47:38 -04:00
unix Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus 2016-06-12 12:05:21 +02:00
vmw_vsock vsock: make listener child lock ordering explicit 2016-06-27 10:44:46 -04:00
wimax
wireless cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header 2016-06-29 11:50:33 +02:00
x25
xfrm
compat.c packet: compat support for sock_fprog 2016-06-09 23:41:03 -07:00
Kconfig
Makefile
socket.c
sysctl_net.c