aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Laing <richard.laing@alliedtelesis.co.nz>2015-09-03 13:52:31 +1200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-01 12:07:38 +0200
commit02b5ca779d6d15b3af9ea79e1be6e9eb1636f286 (patch)
treef4be1fc6d0894f8db35911d87e0a2db16fd4ee61
parent162e3d1c34b0c7b4a2bd016332b48c171a926965 (diff)
downloadlinux-linaro-stable-02b5ca779d6d15b3af9ea79e1be6e9eb1636f286.tar.gz
net/ipv6: Correct PIM6 mrt_lock handling
[ Upstream commit 25b4a44c19c83d98e8c0807a7ede07c1f28eab8b ] 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 <richard.laing@alliedtelesis.co.nz> Acked-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ipv6/ip6mr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 2c84072b1da7..57dd3e7d86cc 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);
}