There are no fallout reports after UNIX sockets unlocking, so I propose
to move moves garbage collector to `systqmp'. unp_gc() touches nothing
which requires kernel lock to be held.

Index: sys/kern/uipc_usrreq.c
===================================================================
RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.143
diff -u -p -r1.143 uipc_usrreq.c
--- sys/kern/uipc_usrreq.c      10 Feb 2021 08:20:09 -0000      1.143
+++ sys/kern/uipc_usrreq.c      16 Feb 2021 09:44:26 -0000
@@ -444,7 +444,7 @@ unp_detach(struct unpcb *unp)
        m_freem(unp->unp_addr);
        pool_put(&unpcb_pool, unp);
        if (unp_rights)
-               task_add(systq, &unp_gc_task);
+               task_add(systqmp, &unp_gc_task);
 
        if (vp != NULL) {
                /*
@@ -1197,7 +1197,7 @@ unp_discard(struct fdpass *rp, int nfds)
        memset(rp, 0, sizeof(*rp) * nfds);
        SLIST_INSERT_HEAD(&unp_deferred, defer, ud_link);
 
-       task_add(systq, &unp_gc_task);
+       task_add(systqmp, &unp_gc_task);
 }
 
 int

Reply via email to