aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-07-12 16:26:26 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-07-12 16:59:02 -0400
commit4b260a98f1afc74cd6b73ce0616d76b441dbe8c5 (patch)
treebba0f6b35326b0e6eba15b6ce33f3393564cc4d0
parentb1d21ca83c9139e7889a754934bcdd7071157560 (diff)
[NETROM] lockdep: fix false positive
NETROM network devices are virtual network devices encapsulating NETROM frames into AX.25 which will be sent through an AX.25 device, so form a special "super class" of normal net devices; split their locks off into a separate class since they always nest. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/netrom/af_netrom.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 672d5f803f8f..1d50f801f181 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -66,6 +66,14 @@ static DEFINE_SPINLOCK(nr_list_lock);
66static const struct proto_ops nr_proto_ops; 66static const struct proto_ops nr_proto_ops;
67 67
68/* 68/*
69 * NETROM network devices are virtual network devices encapsulating NETROM
70 * frames into AX.25 which will be sent through an AX.25 device, so form a
71 * special "super class" of normal net devices; split their locks off into a
72 * separate class since they always nest.
73 */
74static struct lock_class_key nr_netdev_xmit_lock_key;
75
76/*
69 * Socket removal during an interrupt is now safe. 77 * Socket removal during an interrupt is now safe.
70 */ 78 */
71static void nr_remove_socket(struct sock *sk) 79static void nr_remove_socket(struct sock *sk)
@@ -1405,6 +1413,7 @@ static int __init nr_proto_init(void)
1405 free_netdev(dev); 1413 free_netdev(dev);
1406 goto fail; 1414 goto fail;
1407 } 1415 }
1416 lockdep_set_class(&dev->_xmit_lock, &nr_netdev_xmit_lock_key);
1408 dev_nr[i] = dev; 1417 dev_nr[i] = dev;
1409 } 1418 }
1410 1419