[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-net
Subject:    Re: panic: _mtx_lock_sleep: recursed on non-recursive mutex
From:       Ed Maste <emaste () freebsd ! org>
Date:       2008-04-29 0:36:08
Message-ID: 20080429003608.GA11308 () sandvine ! com
[Download RAW message or body]

On Tue, Mar 25, 2008 at 04:00:33PM -0400, Ed Maste wrote:

> GENERIC CURRENT as of this morning.
> 
> panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ \
>                 /d2/emaste/HEAD/src/sys/netinet6/ip6_output.c:719
> ...
> panic() at panic+0x176
> _mtx_lock_sleep() at _mtx_lock_sleep+0x181
> _mtx_lock_flags() at _mtx_lock_flags+0xe1
> ip6_output() at ip6_output+0xe98
> mld6_sendpkt() at mld6_sendpkt+0x204
> mld6_input() at mld6_input+0x55c
> icmp6_input() at icmp6_input+0xf0b
> ip6_input() at ip6_input+0xa6d
> ...

What happens here is that mld6_input() does IF_ADDR_LOCK() to be able
to walk the address list, and then ends up needing to send a packet:

mld6.c
   268  void
   269  mld6_input(struct mbuf *m, int off)
   ...
   330          switch(mldh->mld_type) {
   331          case MLD_LISTENER_QUERY:
   ...
   371                  IF_ADDR_LOCK(ifp);
   372                  TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
   ...
   387                                          mld6_sendpkt(in6m, \
MLD_LISTENER_REPORT,  388                                                  NULL);
   ...
   399                  }
   400                  IF_ADDR_UNLOCK(ifp);

And then mld6_sendpkt() calls ip6_output() which needs to take the
if_addr_mtx at:

ip6_output.c
   719                  IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m);

- Ed
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic