On Wednesday, September 26, 2012 5:28:09 pm Ryan Stone wrote: > On Wed, Sep 26, 2012 at 3:38 PM, John Baldwin <j...@freebsd.org> wrote: > >> ix:rx -> udp -> udpinp -> in_multi_mtx -> ix:core -> ix:rx > > > > Hmm, I'm not sure where the 'in_multi_mtx -> ix:core' bit comes from. > > I think that is the broken part of this. The SIOCADDMULTI and SIOCDELMULTI > > ioctls are invoked without any stack locks held, so it shouldn't come from > > there. > > I gave the backtrace for this part. in_joingroup_locked is called > with the in_multi_mtx held, which calls if_addmulti, which calls the > ioctl handler.
My bad. Too many locks. :( We do drop the IF_ADDR_LOCK when calling if_ioctl from if_addmulti(), but you are correct, in_multi_mtx is held. Not sure how resolvable that is. Many drivers need to do a fair bit of work in SIOCADDMULTI/SIOCDELMUTLI (that is, reprogram the entire multicast table). One alternative might be to use a separate lock just for the MAC filters. That might break the in_multi_mtx -> ix:core order by letting you avoid grabbing ix:core for those ioctls. -- John Baldwin _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"