diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index e4e40cfc8677..165284c472ca 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1147,10 +1147,14 @@ selrecord(selector, sip) mtx_lock(&sellock); /* - * If the thread is NULL then take ownership of selinfo - * however if the thread is not NULL and the thread points to - * someone else, then we have a collision, otherwise leave it alone - * as we've owned it in a previous selrecord on this selinfo. + * If the selinfo's thread pointer is NULL then take ownership of it. + * + * If the thread pointer is not NULL and it points to another + * thread, then we have a collision. + * + * If the thread pointer is not NULL and points back to us then leave + * it alone as we've already added pointed it at us and added it to + * our list. */ if (sip->si_thread == NULL) { sip->si_thread = selector;