LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-24-2009, 01:02 PM   #1
schoi21c
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
kernel Oops message has stack trace that does not correspond to the execution exactly


Hi,

I'm developing a kernel module that is dereferences null pointer. I get Oops message, but its stack trace doesn't match with what my code is doing. For example:

[<c110b282>] ? kobject_get+0x12/0x20
[<c1102c00>] ? exact_match+0x0/0x10
[<c10ff3e5>] ? blk_register_queue+0x45/0xb0
[<c1102c00>] ? exact_match+0x0/0x10
[<c1103822>] ? add_disk+0xe2/0x130
[<c1102c00>] ? exact_match+0x0/0x10
[<c11031d0>] ? exact_lock+0x0/0x20
[<e43da15c>] ? module_init+0x15c/0x22a

so here, my module_init function calls add_disk directly, but I'm seeing exact_* functions called in between.

Is this a usual behavior of stack trace? Is there a way to get this correctly?

Thanks,
 
Old 10-01-2009, 12:02 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Which kernel are you using?

I'm not much following what your kernel module's doing, but there has been a patch against just about every kernel ever made, that deals with a null-dereferencing bug which has been in the kernel for a long time; maybe you should update to a newer kernel, or Patch your kernel to avoid the bug?


Sasha
 
Old 10-02-2009, 11:02 AM   #3
schoi21c
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Hi, Sasha

This is actually happening in my own module, so it's easy for me to debug this particular issue, but in general, when the stack trace is not accurate, it makes it harder to pinpoint the issue. And the Oops message stack trace does not correspond to my module's execution path, such as having some calls that my code never made. My question is, how do you get an accurate stack trace in the Oops message, or if that's not possible, how is one supposed to interpret the stack trace in Oops message?

Thanks!
 
  


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
Kernel oops message Niteflite Linux - General 1 07-03-2009 01:43 AM
kernel oops message logging... Niteflite Linux - Kernel 1 06-26-2009 04:07 AM
kernel oops message vinnie_vinodh Fedora 2 02-01-2009 08:07 AM
How To interpret kernel stack trace kklier Linux - Enterprise 6 08-22-2004 09:24 AM
Kernel Oops (error message) DigiCrime Linux - Software 1 02-09-2004 05:07 PM

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

All times are GMT -5. The time now is 05:34 PM.

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
Open Source Consulting | Domain Registration