svn commit: r339251 - in head/sys: net netinet netinet6

John Baldwin jhb at FreeBSD.org
Tue Oct 9 18:57:57 UTC 2018


On 10/9/18 8:36 AM, Jonathan T. Looney wrote:
> On Tue, Oct 9, 2018 at 11:02 AM John Baldwin <jhb at freebsd.org <mailto:jhb at freebsd.org>> wrote:
> 
>     Do we have some sort of simple per-thread epoch counter similar to
>     td->td_locks that we could assert on in userret() and in the ithread loop
>     when ithreads go to sleep to help catch leaked locks?
> 
> 
> Yes: td->td_epochnest.
> 
> There are already INVARIANTS checks in malloc (for M_WAITOK),  userret(), and _sleep(). I think that covers the cases you mentioned. However, I am very much in favor of adding any additional checks which make sense.

The one that would matter in this case would be idle ithreads.  We have
some existing checks (WITNESS_WARN) in ithread_loop() already.  We should
add a td_epochnest assertion next to that line I think.

-- 
John Baldwin

                                                                            


More information about the svn-src-all mailing list