Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Feb 2024 19:11:37 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 93f523ab3668 - stable/14 - netinet: Remove stale references to Giant from comments
Message-ID:  <202402031911.413JBbOY092962@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=93f523ab3668516f34d13d844a7772c92411891a

commit 93f523ab3668516f34d13d844a7772c92411891a
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-03-12 18:59:42 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-02-03 19:10:36 +0000

    netinet: Remove stale references to Giant from comments
    
    MFC after:      1 week
    
    (cherry picked from commit bbf86c65d04d6013fd3f7b6d74a341256c4e7336)
---
 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 3a60feadcdab..ae58dc0b8b04 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -168,7 +168,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.
@@ -1674,7 +1673,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 362e3f25115c..94fc807ccea7 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -93,8 +93,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.
@@ -1188,9 +1188,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,
@@ -1364,8 +1364,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
@@ -1552,7 +1550,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 *
@@ -2522,8 +2519,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 *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402031911.413JBbOY092962>