WSL2-Linux-Kernel/net/ieee802154/6lowpan
Eric Dumazet 1d6119baf0 net: fix percpu memory leaks
This patch fixes following problems :

1) percpu_counter_init() can return an error, therefore
  init_frag_mem_limit() must propagate this error so that
  inet_frags_init_net() can do the same up to its callers.

2) If ip[46]_frags_ns_ctl_register() fail, we must unwind
   properly and free the percpu_counter.

Without this fix, we leave freed object in percpu_counters
global list (if CONFIG_HOTPLUG_CPU) leading to crashes.

This bug was detected by KASAN and syzkaller tool
(http://github.com/google/syzkaller)

Fixes: 6d7b857d54 ("net: use lib/percpu_counter API for fragmentation mem accounting")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02 22:47:14 -05:00
..
6lowpan_i.h ieee802154: handle datagram variables as u16 2015-10-01 13:38:22 +02:00
Kconfig ieee802154: create 6lowpan sub-directory 2015-01-08 07:25:59 +01:00
Makefile ieee802154: 6lowpan: fix Makefile entry 2015-01-08 15:48:06 +01:00
core.c 6lowpan: move shared settings to lowpan_netdev_setup 2015-10-08 14:25:34 +02:00
reassembly.c net: fix percpu memory leaks 2015-11-02 22:47:14 -05:00
rx.c ieee802154: 6lowpan: fix memory leak 2015-10-22 12:24:42 +02:00
tx.c 6lowpan: remove lowpan_is_addr_broadcast 2015-10-21 00:49:25 +02:00