Welcome! Log In Create A New Profile


module crashing - __mutex_lock_slowpath

Posted by Armando Hernandez 
Hello guys.

This is my first question in a Linux development/debuggin forum, so you can tell for that how new I am to this universe.
I will try to formulate my question the most precise and best I can.

I am developing a module which is intended to comunicate with other microprocesors via the UART ports. I based my work in the imx.c driver (for imx6 microporcesor from Freescale). This device will not use the standard UART protocol (i.e. 8N1). It is intended just to send packaches of n number of bytes using DMA.
I am using the kernel 3.10.17.
At some point when loading the module I get the following WARNING message:

WARNING: at /home/ahernandez/variscite/linux-3.10.17/kernel/mutex.c:341 __mutex_lock_slowpath+0x320/0x340()
[ 10.577759] DEBUG_LOCKS_WARN_ON(l->magic != l)

and always after this message the kernel panics and the program counter claims to be always at this function.

I have checked that my locks are inited, and that all my locks are locked and then unlocked, but I sill get this.
I found out that in whick line of my module this is crashing:

1. I am locking a lock of one of my structures
2. Function mutex_lock is called in file "mutex.c"
3. Function __mutex_lock_slowpath is called in file "mutex.c"
After that the program counter goes to:
4. Function list_add_tail in file "list.h"
5. Function __list_add in file "list.h" ---> here is where the PC is pointing at after panic, with a null pointer dereference.

It confuses me a lot because I don't see the relation between these PC (and LR) and the mutex functions on the trace, nevertheless I think they are related. I though mabe by inquiring into the warning message I got.... but I can't find out how to debug and track this.

Any suggestion is much more than wellcome given my levels of desperation here haha!
smiling smiley

Re: module crashing - __mutex_lock_slowpath
November 15, 2017 01:58AM
Windows alarm is most important part of the window 10 now and it is also a my life part which always help me alarm windows in my busy daily life routine and by it I can manage my lots of work simply so just click on set alarm clock windows 10 and search your best function.
very informative post
thanks a lot
anorexia forum weight loss

Your Email:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 8 plus 5?