From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590AbbJ0Vbi (ORCPT ); Tue, 27 Oct 2015 17:31:38 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:35181 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754539AbbJ0Vb2 (ORCPT ); Tue, 27 Oct 2015 17:31:28 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Richard Laing , "David S. Miller" , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 85/86] net/ipv6: Correct PIM6 mrt_lock handling Date: Tue, 27 Oct 2015 14:30:25 -0700 Message-Id: <1445981426-19727-86-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445981426-19727-1-git-send-email-kamal@canonical.com> References: <1445981426-19727-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.19.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Richard Laing commit 25b4a44c19c83d98e8c0807a7ede07c1f28eab8b upstream. In the IPv6 multicast routing code the mrt_lock was not being released correctly in the MFC iterator, as a result adding or deleting a MIF would cause a hang because the mrt_lock could not be acquired. This fix is a copy of the code for the IPv4 case and ensures that the lock is released correctly. Signed-off-by: Richard Laing Acked-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Kamal Mostafa --- net/ipv6/ip6mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 7226697..c7a69e8 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -552,7 +552,7 @@ static void ipmr_mfc_seq_stop(struct seq_file *seq, void *v) if (it->cache == &mrt->mfc6_unres_queue) spin_unlock_bh(&mfc_unres_lock); - else if (it->cache == mrt->mfc6_cache_array) + else if (it->cache == &mrt->mfc6_cache_array[it->ct]) read_unlock(&mrt_lock); } -- 1.9.1