LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   getting rwlock bad magic (https://www.linuxquestions.org/questions/linux-kernel-70/getting-rwlock-bad-magic-703634/)

manavvasavada 02-10-2009 10:28 AM

getting rwlock bad magic
 
Hi,

I am working on a kernel module and my module hangs when i run it(and crashes the system). When I check the kernel logs it says "BUG: rwlock bad magic". I can't seem to be able to solve this error.

It is probably something i have missed because i ran other modules with same kind of rwlock variable and initialization and they worked fine.

I am using kernel 2.6.16.

Thanks,
Manav

Mara 02-12-2009 02:46 PM

Most likely you pass a wrong pointer (something you think is a spinlock, but isn't). Maybe you have already destroyed it?

manavvasavada 02-15-2009 12:40 PM

Yes! That was it. I was trying to access a freed object. Should have been the first thing I should have thought off. The phrase 'bad magic' kinda put me off the track. Thanks a lot!


All times are GMT -5. The time now is 10:30 AM.