From: Frederik Deweerdt <deweerdt@free.fr>
To: Peter Staubach <staubach@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>,
greearb@candelatech.com, mingo@redhat.com,
linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [patch] lockdep annotate vlan net device as being a special class
Date: Tue, 27 Jun 2006 17:08:33 +0200 [thread overview]
Message-ID: <20060627150833.GC1800@slug> (raw)
In-Reply-To: <44A13C04.6010609@redhat.com>
On Tue, Jun 27, 2006 at 10:09:08AM -0400, Peter Staubach wrote:
> Shouldn't this test for new_dev being NULL _before_ it gets used?
Indeed, it should. But the lock is inited in register_netdevice anyway.
I tested (compile+boot+ifconfig) the following patch to mm3, and the trace went
away.
Regards,
Frederik
Signed-Off-By: Frederik Deweerdt <frederik.deweerdt@gmail.com>
--- v2.6.17-mm3/net/8021q/vlan.c 2006-06-27 19:02:14.000000000 +0200
+++ v2.6.17-mm3~mod/net/8021q/vlan.c 2006-06-27 18:50:48.000000000 +0200
@@ -469,7 +469,6 @@ static struct net_device *register_vlan_
new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
vlan_setup);
- lockdep_set_class(&new_dev->_xmit_lock, &vlan_netdev_xmit_lock_key);
if (new_dev == NULL)
goto out_unlock;
@@ -528,6 +527,8 @@ static struct net_device *register_vlan_
if (register_netdevice(new_dev))
goto out_free_newdev;
+ lockdep_set_class(&new_dev->_xmit_lock, &vlan_netdev_xmit_lock_key);
+
new_dev->iflink = real_dev->ifindex;
vlan_transfer_operstate(real_dev, new_dev);
linkwatch_fire_event(new_dev); /* _MUST_ call rfc2863_policy() */
prev parent reply other threads:[~2006-06-27 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-15 14:40 lock validator: false positive in vlan_dev.c deweerdt
2006-06-26 14:01 ` [patch] lockdep annotate vlan net device as being a special class Arjan van de Ven
2006-06-27 14:09 ` Peter Staubach
2006-06-27 15:08 ` Frederik Deweerdt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060627150833.GC1800@slug \
--to=deweerdt@free.fr \
--cc=akpm@osdl.org \
--cc=arjan@linux.intel.com \
--cc=greearb@candelatech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=staubach@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox