Skip to content

Commit 7f88c6b

Browse files
strssndktndavem330
authored andcommitted
ipv6: fix possible seqlock deadlock in ip6_finish_output2
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 <[email protected]> Signed-off-by: Hannes Frederic Sowa <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 696701b commit 7f88c6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv6/ip6_output.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ static int ip6_finish_output2(struct sk_buff *skb)
116116
}
117117
rcu_read_unlock_bh();
118118

119-
IP6_INC_STATS_BH(dev_net(dst->dev),
120-
ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
119+
IP6_INC_STATS(dev_net(dst->dev),
120+
ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
121121
kfree_skb(skb);
122122
return -EINVAL;
123123
}

0 commit comments

Comments
 (0)