On Fri, Jul 16, 2004 at 09:35:52AM +0200, Arjan van de Ven wrote:
it's chockfull of races still
Most drivers now days are refcounting and well behaved
Run multiple instance of the following shell script concurrently:
#!/bin/bash modprobe SOMETHING modprobe -r SOMETHING exec $0
Simultaneously probe something viewable from userspace from that module, like in /proc (note that in most cases this is possible as non-root)
#!/bin/bash cat /proc/SOMETHING exec $0
When testing this around 2.6.4 many drivers blew up spectacularly with kernel panics when doing the first script alone, while others either paniced or eventually got stuck with a huge refcount due to the second script. Some of these were races and fixed since then, but there are undoubtedly many remaining now. Other means of triggering races during unloading scares me, because each test case would need to be designed for each specific module.
Warren Togami wtogami@xxxxxxxxxx