HI ALL:<br>    I just run a module on my machine, but it  can&#39;t work. When the module run the kernel will painc. I don&#39;t know where is wrong. This is my code:<br><br> 1 #include&lt;linux/module.h&gt;<br>  2 #include&lt;linux/kernel.h&gt;<br>
  3 #include&lt;linux/init.h&gt;<br>  4 #include&lt;linux/sched.h&gt;<br>  5 <br>  6 int input = 1;<br>  7 module_param (input, int, S_IRUGO);<br>  8 <br>  9 static int __init printvma_init (void)<br> 10 {<br> 11     struct vm_area_struct *p, *start;<br>
 12     int i;<br> 13     struct task_struct *thread;                                                     <br> 14 <br> 15     thread = current;<br> 16 <br> 17     while (1)<br> 18     {<br> 19         if (thread-&gt;pid == input)<br>
 20             break;<br> 21         thread = list_entry (thread-&gt;tasks.next, struct task_struct, tasks);<br> 22     }<br> 23     p = thread-&gt;mm-&gt;mmap;<br> 24 <br> 25     do{<br> 26         printk (&quot;%lx\t%lx\t%s\n&quot;, p-&gt;vm_start,\<br>
 27                 p-&gt;vm_end, p-&gt;vm_file-&gt;f_path.dentry-&gt;d_iname);<br> 28         p = p-&gt;vm_next;<br> 29     }while (p != NULL);<br> 30 <br> 31     printk (&quot;vm_file address is:%d\tf_path address is:%d\<br>
 32             \tname is:%s&quot;,&amp; p-&gt;vm_file-&gt;f_path,\<br> 33             p-&gt;vm_file-&gt;f_path.dentry-&gt;d_iname);<br> 34 <br> 35     printk (&quot;info from the kernel space:%s\n&quot;, thread-&gt;comm);<br>
 36     return 0;<br> 37 }<br> 38 <br> 39 static void __exit printvma_exit (void)<br> 40 {<br> 41     printk (&quot;the module will leave the kernel space..\n&quot;);<br> 42 }<br> 43 <br> 44 module_init (printvma_init);<br>
 45 module_exit (printvma_exit);<br> 46 MODULE_LICENSE (&quot;GPL&quot;);       <br><br><br>what&#39;s wrong?<br><br>thanks<br>