Bryson Lee - 2008-11-27

I just upgraded my x86_64 laptop (HP Pavillion DV6000, FWIW) to Fedora 10 from Fedora 8, where I had ndiswrapper 1.53 working. After the upgrade, I found messages of the following form in /var/log/messages:

Nov 26 13:44:11 alois kernel: ndiswrapper version 1.53 loaded (smp=yes, preempt=no)
Nov 26 13:44:11 alois kernel: ioctl32(loadndisdriver:1973): Unknown cmd fd(0) cmd(40056e00){t:'n';sz:5} arg(ffe1f198) on /dev/ndiswrapper (deleted)
...
Nov 26 13:44:11 alois kernel: usbcore: registered new interface driver ndiswrapper

I think I've traced this back to a race condition between udev and the ndiswrapper.ko <--> loadndiswrapper interaction at module-load time. What appears to be happening is that when the module loads and registers it's device-file settings, udev tries to mknod a corresponding device called "/dev/ndiswrapper" at the same time that the module is invoking loadndiswrapper. Looking at the loadndiswrapper source, it also mknod's /dev/ndiswrapper and unlinks it.

I built a modified loadndiswrapper that uses /tmp/ndiswrapper as the device name and substituted it into /sbin on my system; the module loaded successfully and initialized my wireless adapter.

This could certainly be a configuration problem specific to Fedora 10, but it looks to me as if it could potentially affect any system using a "dynamic" /dev directory.