Search Linux Wireless

Re: Bug in BCMA: device_unregister causing "NULL pointer dereference at"

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

 



On 07/21/2011 03:18 AM, Rafał Miłecki wrote:

So when I unload bcma after I got driver (b43) for 0x812 core, I get
NULL pointer dereference.

Any tip, why does it happen?

I've tracked where does crash really happen (kobject_del does not
really say much). The real forwardtrace is:
device_unregister → device_del → kobject_del → kobj_kset_leave →
kobj_kset_leave → list_del_init

If you take a look at list_del_init, it touches "prev" and "next". So
I've added some debugging:
pr_info("core->dev.kobj.entry.prev: 0x%p\n", core->dev.kobj.entry.prev);
pr_info("core->dev.kobj.entry.next: 0x%p\n", core->dev.kobj.entry.next);

There are options for debugging that you may want to enable:

CONFIG_DEBUG_LIST
CONFIG_DEBUG_OBJECTS
CONFIG_DEBUG_KOBJECT

Actually, consider enabling most debug options as possible, except perhaps the most time consuming (such as CONFIG_DEBUG_KMEMLEAK). Maybe you are passing a freed pointer or something.

Print the pointers you are passing to device_register() and device_unregister().

[  612.819320] bcma: core->dev.kobj.entry.prev: 0x  (null)

You may want to make it a macro and print it in most bcma functions.

--
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux