diff options
author | Richard Laing <richard.laing@alliedtelesis.co.nz> | 2015-09-03 13:52:31 +1200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-10-27 09:33:01 -0400 |
commit | 3ad45f92f83fab87142b06addd1c548f7f6a4e89 (patch) | |
tree | 2f2a1b123907f0f2baab1a191d36aeb19fb7d083 /net | |
parent | 833db3b898d313b4f4f011a8a2cf845e6f620a89 (diff) |
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: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ip6mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 1a01d79b8698..0d58542f9db0 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); } |