[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E2854E5.3020905@gnu.org>
Date: Thu, 21 Jul 2011 12:33:41 -0400
From: Pavel Roskin <proski@....org>
To: Rafał Miłecki <zajec5@...il.com>
CC: linux-wireless@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Bug in BCMA: device_unregister causing "NULL pointer dereference
at"
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists