Re: [crash] BUG: unable to handle kernel NULL pointer dereference at 0000000000000370

Patrick McHardy
2008-07-21T22:05:37Z

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Larry Finger wrote:
> Patrick McHardy wrote:
>>
>> This is what I was missing, we're setting a lockdep class
>> by default depending on dev->type. This patch combined
>> with yours should fix all addr_list_lock warnings.
>
> No cigar yet. I tried davem's patch first, then yours on top of his. I
> still get both the recursive locking and the kernel warning.

Does this one earn me my cigar? :)

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 389 bytes --]

diff --git a/net/core/dev.c b/net/core/dev.c
index 2eed17b..371b1a0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -259,7 +259,7 @@ static RAW_NOTIFIER_HEAD(netdev_chain);

DEFINE_PER_CPU(struct softnet_data, softnet_data);

-#ifdef CONFIG_DEBUG_LOCK_ALLOC
+#ifdef CONFIG_LOCKDEP
/*
* register_netdevice() inits txq->_xmit_lock and sets lockdep class
* according to dev->type