git: bbf86c65d04d - main - netinet: Remove stale references to Giant from comments
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 Jan 2024 18:52:20 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=bbf86c65d04d6013fd3f7b6d74a341256c4e7336
commit bbf86c65d04d6013fd3f7b6d74a341256c4e7336
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-03-12 18:59:42 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-27 18:51:13 +0000
netinet: Remove stale references to Giant from comments
MFC after: 1 week
---
sys/netinet/igmp.c | 2 --
sys/netinet/in_mcast.c | 15 +++++----------
sys/netinet6/in6_mcast.c | 7 ++-----
3 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index 1655963e6cff..454668c2aadc 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -166,7 +166,6 @@ static const struct netisr_handler igmp_nh = {
* Any may be taken independently; if any are held at the same
* time, the above lock order must be followed.
* * All output is delegated to the netisr.
- * Now that Giant has been eliminated, the netisr may be inlined.
* * IN_MULTI_LIST_LOCK covers in_multi.
* * IGMP_LOCK covers igmp_ifsoftc and any global variables in this file,
* including the output queue.
@@ -1672,7 +1671,6 @@ igmp_fasttimo(void *arg __unused)
/*
* Fast timeout handler (per-vnet).
- * Sends are shuffled off to a netisr to deal with Giant.
*
* VIMAGE: Assume caller has set up our curvnet.
*/
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 6d68ebcb188c..f5b20c49ffd2 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -92,8 +92,8 @@ static MALLOC_DEFINE(M_IPMSOURCE, "ip_msource",
/*
* Locking:
*
- * - Lock order is: Giant, IN_MULTI_LOCK, INP_WLOCK,
- * IN_MULTI_LIST_LOCK, IGMP_LOCK, IF_ADDR_LOCK.
+ * - Lock order is: IN_MULTI_LOCK, INP_WLOCK, IN_MULTI_LIST_LOCK, IGMP_LOCK,
+ * IF_ADDR_LOCK.
* - The IF_ADDR_LOCK is implicitly taken by inm_lookup() earlier, however
* it can be taken by code in net/if.c also.
* - ip_moptions and in_mfilter are covered by the INP_WLOCK.
@@ -1186,9 +1186,9 @@ inm_purge(struct in_multi *inm)
/*
* Join a multicast group; unlocked entry point.
*
- * SMPng: XXX: in_joingroup() is called from in_control() when Giant
- * is not held. Fortunately, ifp is unlikely to have been detached
- * at this point, so we assume it's OK to recurse.
+ * SMPng: XXX: in_joingroup() is called from in_control(). Fortunately,
+ * ifp is unlikely to have been detached at this point, so we assume
+ * it's OK to recurse.
*/
int
in_joingroup(struct ifnet *ifp, const struct in_addr *gina,
@@ -1362,8 +1362,6 @@ in_leavegroup_locked(struct in_multi *inm, /*const*/ struct in_mfilter *imf)
* The delta-based API applies only to exclusive-mode memberships.
* An IGMP downcall will be performed.
*
- * SMPng: NOTE: Must take Giant as a join may create a new ifma.
- *
* Return 0 if successful, otherwise return an appropriate error code.
*/
static int
@@ -1550,7 +1548,6 @@ out_inp_locked:
* Given an inpcb, return its multicast options structure pointer. Accepts
* an unlocked inpcb pointer, but will return it locked. May sleep.
*
- * SMPng: NOTE: Potentially calls malloc(M_WAITOK) with Giant held.
* SMPng: NOTE: Returns with the INP write lock held.
*/
static struct ip_moptions *
@@ -2520,8 +2517,6 @@ inp_set_multicast_if(struct inpcb *inp, struct sockopt *sopt)
/*
* Atomically set source filters on a socket for an IPv4 multicast group.
- *
- * SMPng: NOTE: Potentially calls malloc(M_WAITOK) with Giant held.
*/
static int
inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index db2176614f38..a6186568ecb2 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -101,8 +101,8 @@ RB_GENERATE(ip6_msource_tree, ip6_msource, im6s_link, ip6_msource_cmp);
/*
* Locking:
- * - Lock order is: Giant, IN6_MULTI_LOCK, INP_WLOCK,
- * IN6_MULTI_LIST_LOCK, MLD_LOCK, IF_ADDR_LOCK.
+ * - Lock order is: IN6_MULTI_LOCK, INP_WLOCK, IN6_MULTI_LIST_LOCK, MLD_LOCK,
+ * IF_ADDR_LOCK.
* - The IF_ADDR_LOCK is implicitly taken by in6m_lookup() earlier, however
* it can be taken by code in net/if.c also.
* - ip6_moptions and in6_mfilter are covered by the INP_WLOCK.
@@ -1418,8 +1418,6 @@ in6_leavegroup_locked(struct in6_multi *inm, /*const*/ struct in6_mfilter *imf)
* The delta-based API applies only to exclusive-mode memberships.
* An MLD downcall will be performed.
*
- * SMPng: NOTE: Must take Giant as a join may create a new ifma.
- *
* Return 0 if successful, otherwise return an appropriate error code.
*/
static int
@@ -1581,7 +1579,6 @@ out_in6p_locked:
* Given an inpcb, return its multicast options structure pointer. Accepts
* an unlocked inpcb pointer, but will return it locked. May sleep.
*
- * SMPng: NOTE: Potentially calls malloc(M_WAITOK) with Giant held.
* SMPng: NOTE: Returns with the INP write lock held.
*/
static struct ip6_moptions *