Module Name: src Committed By: martin Date: Tue May 5 20:12:37 UTC 2020
Modified Files: src/sys/kern [netbsd-9]: uipc_sem.c Log Message: Pull up following revision(s) (requested by maya in ticket #888): sys/kern/uipc_sem.c: revision 1.59 Release the collision if we find one. Candidate fix for: panic: lock error: Mutex: mutex_vector_enter,542: locking against myself: lock 0xffff8f611abd37e0 cpu 8 lwp 0xffff8f60a3c6a040 cpu8: Begin traceback... vpanic() at netbsd:vpanic+0x178 snprintf() at netbsd:snprintf lockdebug_abort() at netbsd:lockdebug_abort+0xe6 mutex_vector_enter() at netbsd:mutex_vector_enter+0x3c1 ksem_close_fop() at netbsd:ksem_close_fop+0x17 closef() at netbsd:closef+0x69 fd_free() at netbsd:fd_free+0x101 exit1() at netbsd:exit1+0x118 sys_exit() at netbsd:sys_exit+0x3d syscall() at netbsd:syscall+0x299 Would be nice to have an automatic test for this. Since semids are only 24 bits, we only need to create a few thousand of them to have a high probability of collision. Maybe we should bump default semmax while here... To generate a diff of this commit: cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/kern/uipc_sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.