If insmod locked the module file from the time it opened it until it
exited, you would guarantee that only one copy of the module was being
loaded at one time. What do you have insmod do on a locked module?
Wait a little and try again (how many times) or immediately exit with an
error? If it tries again until the module is not locked, then if it
returns EEXIST kmod could treat it as a success, because the module is
now loaded.
The only sticking point is how long to wait and how many retries insmod
makes.
-- Chris Adams - cadams@ro.com System Administrator - Renaissance Internet Services I don't speak for anybody but myself - that's enough trouble.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu