Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Release in6_multilock on callout_halt of mld_ti...



details:   https://anonhg.NetBSD.org/src/rev/94fa64a975eb
branches:  trunk
changeset: 319413:94fa64a975eb
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue May 29 04:36:15 2018 +0000

description:
Release in6_multilock on callout_halt of mld_timeo to avoid a deadlock

diffstat:

 sys/netinet6/mld6.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 216b13f434c5 -r 94fa64a975eb sys/netinet6/mld6.c
--- a/sys/netinet6/mld6.c       Tue May 29 04:35:28 2018 +0000
+++ b/sys/netinet6/mld6.c       Tue May 29 04:36:15 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mld6.c,v 1.93 2018/05/29 04:35:28 ozaki-r Exp $        */
+/*     $NetBSD: mld6.c,v 1.94 2018/05/29 04:36:15 ozaki-r Exp $        */
 /*     $KAME: mld6.c,v 1.25 2001/01/16 14:14:18 itojun Exp $   */
 
 /*
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.93 2018/05/29 04:35:28 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.94 2018/05/29 04:36:15 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -803,10 +803,12 @@
        /* Tell mld_timeo we're halting the timer */
        in6m->in6m_timer = IN6M_TIMER_UNDEF;
 
+       rw_exit(&in6_multilock);
        callout_halt(&in6m->in6m_timer_ch, NULL);
        callout_destroy(&in6m->in6m_timer_ch);
 
        free(in6m, M_IPMADDR);
+       rw_enter(&in6_multilock, RW_WRITER);
 }
 
 /*



Home | Main Index | Thread Index | Old Index