https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195262
Xin LI <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected], | |[email protected] --- Comment #3 from Xin LI <[email protected]> --- I think these are false positives. harvest_mtx is a spinning mutex that is only acquired in random_harvestq.c, and it's already done quite carefully. The problem is raised when calling msleep_spin_sbt(), which in turn tries to acquire sleepq chain lock (sys/kern/subr_sleepqueue.c). In witness, the "blessed" order is sleepq chain and then entropy harvest mutex, this is not right (the system does not poke with entropy harvesting when manipulating sleepq chain), so you see the second LOR warning. When it tries to print the LOR warning, the code eventually calls printf() which in turn would go to syscons(4) where scrlock is acquired. The defined lock order wants scrlock be acquired before harvest_mtx and therefore you would see the first LOR warning. Could you please try the attached patch and see if it solves the problem? What it does is to move entropy mutex slightly higher, allowing it to be held before acquiring sleepq chain lock. This would eliminate the (false) LOR warning and make the first LOR go away at the same time. Adding jhb@ and markm@ for review. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
