diff options
author | Eric Dumazet <edumazet@google.com> | 2013-02-19 13:42:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-19 14:33:55 -0500 |
commit | 303c07db487be59ae9fda10600ea65ca11c21497 (patch) | |
tree | 23a66e53bed3b6f8093d815890388b9057760bd9 /drivers/net/ppp | |
parent | 7cb08d7f3a5ea6131f4f243c2080530ac41cb293 (diff) |
ppp: set qdisc_tx_busylock to avoid LOCKDEP splat
If a qdisc is installed on a ppp device, its possible to get
a lockdep splat under stress, because nested dev_queue_xmit() can
lock busylock a second time (on a different device, so its a false
positive)
Avoid this problem using a distinct lock_class_key for ppp
devices.
Reported-by: Yanko Kaneti <yaneti@declera.com>
Tested-by: Yanko Kaneti <yaneti@declera.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp')
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 4fd754e74eb2..3db9131e9229 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -1058,7 +1058,15 @@ ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64) | |||
1058 | return stats64; | 1058 | return stats64; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | static struct lock_class_key ppp_tx_busylock; | ||
1062 | static int ppp_dev_init(struct net_device *dev) | ||
1063 | { | ||
1064 | dev->qdisc_tx_busylock = &ppp_tx_busylock; | ||
1065 | return 0; | ||
1066 | } | ||
1067 | |||
1061 | static const struct net_device_ops ppp_netdev_ops = { | 1068 | static const struct net_device_ops ppp_netdev_ops = { |
1069 | .ndo_init = ppp_dev_init, | ||
1062 | .ndo_start_xmit = ppp_start_xmit, | 1070 | .ndo_start_xmit = ppp_start_xmit, |
1063 | .ndo_do_ioctl = ppp_net_ioctl, | 1071 | .ndo_do_ioctl = ppp_net_ioctl, |
1064 | .ndo_get_stats64 = ppp_get_stats64, | 1072 | .ndo_get_stats64 = ppp_get_stats64, |