LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-10-2009, 10:28 AM   #1
manavvasavada
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Rep: Reputation: 0
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
 
Old 02-12-2009, 02:46 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
Most likely you pass a wrong pointer (something you think is a spinlock, but isn't). Maybe you have already destroyed it?
 
Old 02-15-2009, 12:40 PM   #3
manavvasavada
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad Magic Number??? Acej Linux - Newbie 4 10-07-2008 08:33 AM
Opensuse 10.3 bad magic knetworkmanager kptkill Linux - Software 0 09-06-2008 11:44 AM
Bad Magic Number joseph Linux - Software 1 01-05-2004 03:22 AM
Bad Magic Number? Thewyzewun Linux - General 17 10-19-2003 05:59 PM
CPIO:bad Magic anoop_chandran Linux - Software 1 11-24-2001 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration