Re: scull devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/26/05, raja <vnagaraju@xxxxxxxxxxxx> wrote:
> Hi,
>    I am studying the book LDD3 by rubini.And I am trying to implement
> the scull char device driver.And I followed the same procedure as in the
> book.
> And I implemented only init,exit functions as begining.And I inserted
> the module.It is inserting fine.And printing the debug messages
> correctly as i given.
> But when i try to remove that module,it is comming as segmentation fault
> and in the kernel log it is printing as
> Unable to handle kernel NULL pointer dereference at virtual address
> 00000007
>
> I cannot understand where the wrong is.I am listing the code below.Will
> you please help me.
>

Compare your code with the example of LDD3 and try to find the problem
.... You can debug using printk too .... use printk in your exit
function and try to find the NULL pointer  and also can see on which
line the code is giving fault as you can use printk for before and
after each line of code or function call and will get prints upto the
line just above the code which is giving seg fault .....

--
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux