subr_witness.c "rm_spinlock" and "smp rendezvous" wrong declaration order

Philippe Jalaber pjalaber at gmail.com
Wed Sep 10 07:46:23 UTC 2014


Hello there,

I have been playing with SMP and witness and looking at subr_witness.c. I
suspect there is a bug in the declaration order of locks "rm_spinlock" and
"smp rendezvous". It leads witness to fire a wrong LOR in SMP.

Details: _rm_wlock in kern/kern_rmlock.c calls smp_rendezvous_cpus who
locks smp_ipi_mtx then calls smp_rendezvous_action who calls rm_cleanIPI
who locks rm_spinlock.

So "smp_rendezvous" should be declared before "rm_spinlock" in
subr_witness.c

Thanks for reading me,
Philippe


More information about the freebsd-hackers mailing list