From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755997Ab3LQSku (ORCPT ); Tue, 17 Dec 2013 13:40:50 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:60799 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755537Ab3LQSOL (ORCPT ); Tue, 17 Dec 2013 13:14:11 -0500 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Eric Dumazet , Hannes Frederic Sowa , "David S. Miller" , Luis Henriques Subject: [PATCH 3.5 022/103] ipv6: fix possible seqlock deadlock in ip6_finish_output2 Date: Tue, 17 Dec 2013 18:12:11 +0000 Message-Id: <1387304012-23805-23-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387304012-23805-1-git-send-email-luis.henriques@canonical.com> References: <1387304012-23805-1-git-send-email-luis.henriques@canonical.com> X-Extended-Stable: 3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.5.7.28 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Hannes Frederic Sowa commit 7f88c6b23afbd31545c676dea77ba9593a1a14bf upstream. 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 Signed-off-by: Hannes Frederic Sowa Acked-by: Eric Dumazet Signed-off-by: David S. Miller [ luis: backported to 3.5: adjusted context ] Signed-off-by: Luis Henriques --- net/ipv6/ip6_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 01cf1cd..9665b28 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -144,8 +144,8 @@ static int ip6_finish_output2(struct sk_buff *skb) return res; } rcu_read_unlock(); - IP6_INC_STATS_BH(dev_net(dst->dev), - ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); + IP6_INC_STATS(dev_net(dst->dev), + ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); kfree_skb(skb); return -EINVAL; } -- 1.8.3.2