Unknown symbol mutex_lock_interruptible

Started by Chris, September 28, 2015, 08:03:43 PM

Previous topic - Next topic


I'm stuck with a stange kernel error. I successfully built a wifi driver for my rtl8188eu, but it won't load:
>insmod 8188eu.ko
Error: could not insert module 8188eu.ko: Unknown symbol in module

>dmesg | tail -n 1
8188eu: Unknown symbol mutex_lock_interruptible (err 0)

AFAIK mutex_lock_interruptible is a kernel function (defined in kernel/locking/mutex.c) since 2.6.x and I'm driving a 4.1.4 kernel (and verified that mutex_lock_interruptible is still existing there). Why the f*** does the driver not find that symbol?? :o


Probably the mutex_lock_interruptible function was replaced by someting new, maybe during the Big Kernel Lock removal or someting like that (there was a lot of kernel development between 2.6.x and 4.1.x). There is almost surely a function which does the same work, but with a different name.

I am not a kernel programmer (I wrote some simple device drivers, but in the distant mists of age of kernel 2.4 :-) ), but it seems that the the mutex_lock_interruptible was replacetd by mutex_lock_interruptible_nested, try looking into the krenel header file include/linux/mutex.h for more informations.

BTW: Are you including the right set of kernel include files? If I read the header files correctly, the old name-new name transitions is corrected by a macro, so if you include the right set, the symbols should be automagicaly changed to mutex_lock_interruptible_nested.


Thanks for your kind advice - yes, the linux headers caused the problem. I used prebuilt headers downloaded from the archlinuxarm repository - probably not compatible. Now I use the headers from my own kernel build, and get no more unknown symbols.
So it's always a good idea to only trust what you have built by yourself!  ;)