summaryrefslogtreecommitdiffstats
path: root/lib/bch.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-05-25 14:27:35 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-07 12:05:59 +0200
commit338f665acb4ba0b2c7656cc2487326497220168f (patch)
tree0fbfa975d486b03d73117a5318d46d33e653c29c /lib/bch.c
parent97f54575ff57da3f93f95006802a7892450c1898 (diff)
downloadlinux-stable-338f665acb4ba0b2c7656cc2487326497220168f.tar.gz
linux-stable-338f665acb4ba0b2c7656cc2487326497220168f.tar.bz2
linux-stable-338f665acb4ba0b2c7656cc2487326497220168f.zip
ipv4: add reference counting to metrics
[ Upstream commit 3fb07daff8e99243366a081e5129560734de4ada ] Andrey Konovalov reported crashes in ipv4_mtu() I could reproduce the issue with KASAN kernels, between 10.246.7.151 and 10.246.7.152 : 1) 20 concurrent netperf -t TCP_RR -H 10.246.7.152 -l 1000 & 2) At the same time run following loop : while : do ip ro add 10.246.7.152 dev eth0 src 10.246.7.151 mtu 1500 ip ro del 10.246.7.152 dev eth0 src 10.246.7.151 mtu 1500 done Cong Wang attempted to add back rt->fi in commit 82486aa6f1b9 ("ipv4: restore rt->fi for reference counting") but this proved to add some issues that were complex to solve. Instead, I suggested to add a refcount to the metrics themselves, being a standalone object (in particular, no reference to other objects) I tried to make this patch as small as possible to ease its backport, instead of being super clean. Note that we believe that only ipv4 dst need to take care of the metric refcount. But if this is wrong, this patch adds the basic infrastructure to extend this to other families. Many thanks to Julian Anastasov for reviewing this patch, and Cong Wang for his efforts on this problem. Fixes: 2860583fe840 ("ipv4: Kill rt->fi") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Julian Anastasov <ja@ssi.bg> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/bch.c')
0 files changed, 0 insertions, 0 deletions