Commit 0fdc68d7 authored by Richard Laing's avatar Richard Laing Committed by Luis Henriques

net/ipv6: Correct PIM6 mrt_lock handling

commit 25b4a44c 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: default avatarRichard Laing <richard.laing@alliedtelesis.co.nz>
Acked-by: default avatarCong Wang <cwang@twopensource.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 781a95d3
...@@ -552,7 +552,7 @@ static void ipmr_mfc_seq_stop(struct seq_file *seq, void *v) ...@@ -552,7 +552,7 @@ static void ipmr_mfc_seq_stop(struct seq_file *seq, void *v)
if (it->cache == &mrt->mfc6_unres_queue) if (it->cache == &mrt->mfc6_unres_queue)
spin_unlock_bh(&mfc_unres_lock); 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); read_unlock(&mrt_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment