Commit b9e0d1d1 authored by Hannes Frederic Sowa's avatar Hannes Frederic Sowa Committed by Willy Tarreau

ipv6: fix possible seqlock deadlock in ip6_finish_output2

[ Upstream commit 7f88c6b2 ]

IPv6 stats are 64 bits and thus are protected with a seqlock. By not
disabling bottom-half we could deadlock here if we don't disable bh and
a softirq reentrantly updates the same mib.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 1bbc9e91
...@@ -91,8 +91,8 @@ static int ip6_output_finish(struct sk_buff *skb) ...@@ -91,8 +91,8 @@ static int ip6_output_finish(struct sk_buff *skb)
else if (dst->neighbour) else if (dst->neighbour)
return dst->neighbour->output(skb); return dst->neighbour->output(skb);
IP6_INC_STATS_BH(dev_net(dst->dev), IP6_INC_STATS(dev_net(dst->dev),
ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
kfree_skb(skb); kfree_skb(skb);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment