새로만든 시스템콜에 관련해서 나오는 에러메세지입니다. 부탁드

munin의 이미지

Unable to handle kernel NULL pointer dereference at virtual address 00000000
 printing eip:
c011e7d1
*pde = 00000000
Oops: 0000
autofs 3c59x ipt_REJECT iptable_filter ip_tables mousedev keybdev input hid us
CPU:    0
EIP:    0010:[<c011e7d1>]    Not tainted
EFLAGS: 00010297

EIP is at close_files [kernel] 0x21 (2.4.18-14custom)
eax: 00000000   ebx: c2913560   ecx: 00000000   edx: 00000001
esi: 00000000   edi: 00000000   ebp: c2913560   esp: cf139eac
ds: 0018   es: 0018   ss: 0018
Process a.out (pid: 822, stackpage=cf139000)
Stack: 00000300 00000001 00000000 c2913560 00000000 cf138000 0000000b c011d9b8 
       c2913560 cf138000 c1a8fb20 c011e025 c2913560 c1b012dc cf138000 00000000 
       cf139f30 0000000b c012436c 0000000b c0124554 0000000b c2cba8cc 0000000b 
Call Trace: [<c011d9b8>] put_files_struct [kernel] 0x28 (0xcf139ec8))
[<c011e025>] do_exit [kernel] 0xc5 (0xcf139ed8))
[<c012436c>] sig_exit [kernel] 0xac (0xcf139ef4))
[<c0124554>] dequeue_signal [kernel] 0x64 (0xcf139efc))
[<c0108ea7>] do_signal [kernel] 0x1f7 (0xcf139f14))
[<c01168c0>] do_page_fault [kernel] 0x0 (0xcf139fb8))
[<c0109148>] signal_return [kernel] 0x14 (0xcf139fc0))


Code: 8b 1c b8 47 85 db 74 e7 c7 44 24 08 00 e0 ff ff b8 00 e0 ff 
 

보통 printk로 디버깅을 했었는대...

이렇게 나오니 어디서부터 손을 대야할지...;;;

혹시나 어떤 에러인지 아시는 분이 계시면 꼭 부탁드립니다.

그리고 덤으로 이런 경우 어떻게 디버깅을 해야하는지 알려주시면 정말 감사드립니다.

좋은 하루되세요.

applick의 이미지

이런 경우의 에러는 보통 할당하지 않은 메모리를 접근했을 때 나오는 에러인 것 같습니다.

munin의 이미지

혹시 어떤 변수가 메모리를 할당 받지 못했는지 나와있지는 않나요?

아니면 이런경우 디버깅 하는 요령이라도...^^;;;

꼭 부탇드립니다.

修身齊家治國平天下

hb_kim의 이미지

대규모 커널/드라이버 프로그래밍을 하는 경우는 crash 툴을 씁니다. gdb 의 add-on 이죠.

http://oss.missioncriticallinux.com/projects/crash/

스택을 back-trace 한후, 어느 메모리를 액세스하다가 null-pointer dereferecing fault 가 발생했는지를 확인한 후에 data structure를 훑어 보면서 원인을 짐작해 나가는 수순으로 디버깅합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.