Skip to content

Commit

Permalink
[BPQ] lockdep: fix false positive
Browse files Browse the repository at this point in the history
Bpqether is encapsulating AX.25 frames into ethernet frames.  There is a
virtual bpqether device paired with each ethernet devices, so it's normal
to pass through dev_queue_xmit twice for each frame which triggers the
locking detector.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ralf Baechle authored and David S. Miller committed Jul 10, 2006
1 parent 7466d90 commit 1eeb7e4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/hamradio/bpqether.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ struct bpqdev {

static LIST_HEAD(bpq_devices);

/*
* bpqether network devices are paired with ethernet devices below them, so
* form a special "super class" of normal ethernet devices; split their locks
* off into a separate class since they always nest.
*/
static struct lock_class_key bpq_netdev_xmit_lock_key;

/* ------------------------------------------------------------------------ */

Expand Down Expand Up @@ -528,6 +534,7 @@ static int bpq_new_device(struct net_device *edev)
err = register_netdevice(ndev);
if (err)
goto error;
lockdep_set_class(&ndev->_xmit_lock, &bpq_netdev_xmit_lock_key);

/* List protected by RTNL */
list_add_rcu(&bpq->bpq_list, &bpq_devices);
Expand Down

0 comments on commit 1eeb7e4

Please sign in to comment.