unp gc vs socket close/shutdown race

Conrad Meyer cse.cem at gmail.com
Sun Jul 12 17:51:58 UTC 2015


Hi all,

(Sorry In-Reply-To is wrong; gmail isn't the most flexible MUA and I
was not subscribed to FreeBSD-Current until today.)

I have a slightly cleaned up version of this patch in phabricator at
https://reviews.freebsd.org/D3044 . My mentor thinks it looks ok, but
we would appreciate any feedback y'all have. The PR is here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194264 .

Primary changes from MJG's patch:

* Rather than adding PR_DISPOSE2 flag, we just change dom_dispose KPI.
Unix local domain is the only in-tree consumer.

* Use unp_gcflag IGNORED flag to only skip scanning RIGHTS on a socket
during GC mark phase. Unix sockets may refer to other sockets in the
graph while being half shutdown (shutdown(SHUT_RD)), they just won't
have valid RIGHTS.

Thanks,
Conrad


More information about the freebsd-current mailing list