summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2018-07-04 06:47:34 +0000
committerHiroki Sato <hrs@FreeBSD.org>2018-07-04 06:47:34 +0000
commit5ba05d3d0ec9515d2f112345d39cdf20b79a8931 (patch)
tree370d1eff9e9f575c6effde7b9abeb6fae9d02163
parent4619bce883aa504ef14c9db5419473cb20c8d1d8 (diff)
downloadsrc-test2-5ba05d3d0ec9515d2f112345d39cdf20b79a8931.tar.gz
src-test2-5ba05d3d0ec9515d2f112345d39cdf20b79a8931.zip
Notes
-rw-r--r--sys/netinet/in_mcast.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 0219f722ff26..baff6f5db9d8 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -1579,23 +1579,24 @@ inp_block_unblock_source(struct inpcb *inp, struct sockopt *sopt)
* Begin state merge transaction at IGMP layer.
*/
IN_MULTI_LOCK();
- IN_MULTI_LIST_LOCK();
CTR1(KTR_IGMPV3, "%s: merge inm state", __func__);
+ IN_MULTI_LIST_LOCK();
error = inm_merge(inm, imf);
if (error) {
CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__);
+ IN_MULTI_LIST_UNLOCK();
goto out_in_multi_locked;
}
CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__);
error = igmp_change_state(inm);
+ IN_MULTI_LIST_UNLOCK();
if (error)
CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__);
out_in_multi_locked:
IN_MULTI_UNLOCK();
- IN_MULTI_UNLOCK();
out_imf_rollback:
if (error)
imf_rollback(imf);
@@ -2492,6 +2493,7 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sopt)
if (error) {
CTR1(KTR_IGMPV3, "%s: failed to merge inm state",
__func__);
+ IN_MULTI_LIST_UNLOCK();
goto out_in_multi_locked;
}
@@ -2736,12 +2738,12 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
INP_WLOCK_ASSERT(inp);
IN_MULTI_LOCK();
- IN_MULTI_LIST_LOCK();
/*
* Begin state merge transaction at IGMP layer.
*/
CTR1(KTR_IGMPV3, "%s: merge inm state", __func__);
+ IN_MULTI_LIST_LOCK();
error = inm_merge(inm, imf);
if (error) {
CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__);