A process should always be able to attach kevent filters to its own threads, even when it has changed uid or gid in the past.  As is, a P_SUGID process using rthreads leaks the stack on thread exit.
A process should always be able to attach kevent filters to its own
threads, even when it has changed uid or gid in the past.  As is, a
P_SUGID process using rthreads leaks the stack on thread exit.

requested and approved by tedu@ a while ago

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars