mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
net: sched: don't recurse on the netdev ops lock in qdiscs
cbs_set_port_rate() and taprio_set_picos_per_byte() are reached from
two paths and both already hold the device's ops lock:
*_change(), via tc_modify_qdisc() which calls netdev_lock_ops(dev)
before dispatching to the qdisc ops.
*_dev_notifier() on NETDEV_UP / NETDEV_CHANGE, where caller
holds the ops lock across the notifier chain.
Switch to netif_get_link_ksettings() to avoid deadlock once
__ethtool_get_link_ksettings() starts taking the netdev lock.
Link: https://patch.msgid.link/20260603012840.2254293-9-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
20398c41d0
commit
e50f6245be
|
|
@ -327,7 +327,7 @@ static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q)
|
|||
s64 port_rate;
|
||||
int err;
|
||||
|
||||
err = __ethtool_get_link_ksettings(dev, &ecmd);
|
||||
err = netif_get_link_ksettings(dev, &ecmd);
|
||||
if (err < 0)
|
||||
goto skip;
|
||||
|
||||
|
|
|
|||
|
|
@ -1299,7 +1299,7 @@ static void taprio_set_picos_per_byte(struct net_device *dev,
|
|||
int picos_per_byte;
|
||||
int err;
|
||||
|
||||
err = __ethtool_get_link_ksettings(dev, &ecmd);
|
||||
err = netif_get_link_ksettings(dev, &ecmd);
|
||||
if (err < 0)
|
||||
goto skip;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user