multicast incorrectly calls in to drivers with a mutex held causing drivers to have to go through all manner of contortions to use a non sleepable lock
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netinet6/in6_var.h | ||
---|---|---|
105 ↗ | (On Diff #41284) | Since this is being included from user land (ifconfig or something else), we'll need a #ifdef _KERNEL here to keep the MALLOC_DECLARE() from being looked up: diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 8507487a100..b95604af417 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -101,8 +101,11 @@ struct scope6_id; struct lltable; struct mld_ifsoftc; struct in6_multi; + +#ifdef _KERNEL SLIST_HEAD(in6_multi_head, in6_multi); MALLOC_DECLARE(M_IP6MADDR); +#endif struct in6_ifextra { counter_u64_t *in6_ifstat; |
Some universe build failures...
_.amd64.LINT-NOINET---- kernel ---
_.amd64.LINT-NOINET-linking kernel
_.amd64.LINT-NOINET:ld: error: undefined symbol: in_multi_list_mtx
_.amd64.LINT-NOINET->>> referenced by if.c
_.amd64.LINT-NOINET->>> if.o:(if_addmulti)
_.amd64.LINT-NOINET6---- kernel ---
_.amd64.LINT-NOINET6-linking kernel
_.amd64.LINT-NOINET6:ld: error: undefined symbol: in6_multi_list_mtx
_.amd64.LINT-NOINET6->>> referenced by if.c
_.amd64.LINT-NOINET6->>> if.o:(if_addmulti)
_.amd64.LINT-NOINET6-*** [kernel] Error code 1
_.amd64.LINT-NOIP---- if.o ---
_.amd64.LINT-NOIP:/usr/home/admin/src/freebsd-base/sys/net/if.c:3434:2: error: implicit declaration of function 'IN_MULTI_LIST_UNLOCK_ASSERT' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
_.amd64.LINT-NOIP- IN_MULTI_LIST_UNLOCK_ASSERT();
_.amd64.LINT-NOIP- ^
Arm ports fail as well:
--- kernel.full ---
linking kernel.full
in_mcast.o: In function `inm_init':
/usr/home/admin/src/freebsd-base/sys/netinet/in_mcast.c:236: undefined reference to `iflib_config_gtask_init'
in6_mcast.o: In function `in6m_init':
/usr/home/admin/src/freebsd-base/sys/netinet6/in6_mcast.c:557: undefined reference to `iflib_config_gtask_init'
*** [kernel.full] Error code 1
SPARC and PowerPC get this:
--- in_mcast.o ---
cc1: warnings being treated as errors
/usr/home/admin/src/freebsd-base/sys/netinet/in_mcast.c:234: warning: function declaration isn't a prototype [-Wstrict-prototypes]
Changes committed did not make it into this review due to issues updating Phabricator from a git source. See rS333175 for final version.