aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ifb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-21 10:57:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-21 10:57:45 -0400
commit7d3628b230ecbdc29566c18bc7800ff8ed66a71f (patch)
treeeac1bff40bdb655fdfdeaf1e22ce12a81296f1fb /drivers/net/ifb.c
parent2c7871982cf27caaddbaeb7e2121ce1374b520ff (diff)
parent94833dfb8c98ed4ca1944dd2c1339d88a2d1c758 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits) [NET] ifb: set separate lockdep classes for queue locks [IPV6] KCONFIG: Fix description about IPV6_TUNNEL. [TCP]: Fix shrinking windows with window scaling netpoll: zap_completion_queue: adjust skb->users counter bridge: use time_before() in br_fdb_cleanup() [TG3]: Fix build warning on sparc32. MAINTAINERS: bluez-devel is subscribers-only audit: netlink socket can be auto-bound to pid other than current->pid (v2) [NET]: Fix permissions of /proc/net [SCTP]: Fix a race between module load and protosw access [NETFILTER]: ipt_recent: sanity check hit count [NETFILTER]: nf_conntrack_h323: logical-bitwise & confusion in process_setup() [RT2X00] drivers/net/wireless/rt2x00/rt2x00dev.c: remove dead code, fix warning [IPV4]: esp_output() misannotations [8021Q]: vlan_dev misannotations xfrm: ->eth_proto is __be16 [IPV4]: ipv4_is_lbcast() misannotations [SUNRPC]: net/* NULL noise [SCTP]: fix misannotated __sctp_rcv_asconf_lookup() [PKT_SCHED]: annotate cls_u32 ...
Diffstat (limited to 'drivers/net/ifb.c')
-rw-r--r--drivers/net/ifb.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 15949d3df17e..af233b591534 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -35,6 +35,7 @@
35#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
36#include <net/pkt_sched.h> 36#include <net/pkt_sched.h>
37#include <net/net_namespace.h> 37#include <net/net_namespace.h>
38#include <linux/lockdep.h>
38 39
39#define TX_TIMEOUT (2*HZ) 40#define TX_TIMEOUT (2*HZ)
40 41
@@ -227,6 +228,16 @@ static struct rtnl_link_ops ifb_link_ops __read_mostly = {
227module_param(numifbs, int, 0); 228module_param(numifbs, int, 0);
228MODULE_PARM_DESC(numifbs, "Number of ifb devices"); 229MODULE_PARM_DESC(numifbs, "Number of ifb devices");
229 230
231/*
232 * dev_ifb->queue_lock is usually taken after dev->ingress_lock,
233 * reversely to e.g. qdisc_lock_tree(). It should be safe until
234 * ifb doesn't take dev->queue_lock with dev_ifb->ingress_lock.
235 * But lockdep should know that ifb has different locks from dev.
236 */
237static struct lock_class_key ifb_queue_lock_key;
238static struct lock_class_key ifb_ingress_lock_key;
239
240
230static int __init ifb_init_one(int index) 241static int __init ifb_init_one(int index)
231{ 242{
232 struct net_device *dev_ifb; 243 struct net_device *dev_ifb;
@@ -246,6 +257,10 @@ static int __init ifb_init_one(int index)
246 err = register_netdevice(dev_ifb); 257 err = register_netdevice(dev_ifb);
247 if (err < 0) 258 if (err < 0)
248 goto err; 259 goto err;
260
261 lockdep_set_class(&dev_ifb->queue_lock, &ifb_queue_lock_key);
262 lockdep_set_class(&dev_ifb->ingress_lock, &ifb_ingress_lock_key);
263
249 return 0; 264 return 0;
250 265
251err: 266err: