Skip to content

Commit 303c07d

Browse files
edumazetdavem330
authored andcommitted
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 <[email protected]> Tested-by: Yanko Kaneti <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7cb08d7 commit 303c07d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/net/ppp/ppp_generic.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,15 @@ ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64)
10581058
return stats64;
10591059
}
10601060

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+
10611068
static const struct net_device_ops ppp_netdev_ops = {
1069+
.ndo_init = ppp_dev_init,
10621070
.ndo_start_xmit = ppp_start_xmit,
10631071
.ndo_do_ioctl = ppp_net_ioctl,
10641072
.ndo_get_stats64 = ppp_get_stats64,

0 commit comments

Comments
 (0)