Re: Kernel Oops on device_create

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

 



On Mon, Jan 12, 2009 at 5:43 AM, Frank Thieme <frank@xxxxxxxxxxx> wrote:
> Hi!
>
>
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> pgd = c349c000

my guess:   some structures not properly initialized before accessing it?

> [00000000] *pgd=23850031, *pte=00000000, *ppte=00000000
> Internal error: Oops: 17 [#1]
> Modules linked in: si_fpga
> CPU: 0    Not tainted  (2.6.22 #7)
> Backtrace:
> [<c0109a04>] (vsnprintf+0x0/0x5c8) from [<c012c698>]
> (device_create+0x78/0xb4)
> [<c012c624>] (device_create+0x4/0xb4) from [<bf000368>]
> (init_module+0x14c/0x1f)
>  r7:bf000d04 r6:bf000d80 r5:bf000f00 r4:bf000440
> [<bf00021c>] (init_module+0x0/0x1f8 [si_fpga]) from [<c005798c>]
> (sys_init_modu)
>  r8:00000012 r7:c3ce856c r6:bf000d80 r5:c3ce8400 r4:c3ce854c
> [<c005675c>] (sys_init_module+0x0/0x12e8) from [<c0024de0>]
> (ret_fast_syscall+0)
> Code: e51b3030 e2833001 e50b3030 e51b3030 (e5d33000)
> Segmentation fault
>
> Any hints?
>
> Bye...Frank


and because u mentioned it worked in later kernel, so why not take the
diff between device_create() between the two kernel versions and
analyze from there:

my analysis is that both version have the same initialization in
device_create() implementation except for

        dev->devt = devt;
        dev->class = class;
        dev->parent = parent;
        dev->release = device_create_release;
        dev_set_drvdata(dev, drvdata);=============> this is NOT done in 2.6.22.

        vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args);
        retval = device_register(dev);


So what if u add this into the 2.6.22 - does it solve the problem?


-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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