Hi,


Cong Wang <xiyou.wangc...@gmail.com> writes:

> On Thu, Mar 28, 2019 at 5:20 PM Leandro Dorileo
> <leandro.maciel.dori...@intel.com> wrote:
>> +static int taprio_dev_notifier(struct notifier_block *nb, unsigned long 
>> event,
>> +                              void *ptr)
>> +{
>> +       struct net_device *dev = netdev_notifier_info_to_dev(ptr);
>> +       struct taprio_sched *q;
>> +       struct net_device *qdev;
>> +
>> +       ASSERT_RTNL();
>> +
>> +       if (event != NETDEV_UP && event != NETDEV_CHANGE)
>> +               return NOTIFY_DONE;
>> +
>> +       spin_lock(&taprio_list_lock);
>> +       list_for_each_entry(q, &taprio_list, taprio_list) {
>> +               qdev = qdisc_dev(q->root);
>> +               if (qdev == dev) {
>> +                       taprio_set_picos_per_byte(dev, q);
>> +                       break;
>
> Is it safe to call __ethtool_get_link_ksettings() with spinlock held?
> I mean is it blocking?
>
> Please audit all the dev->ethtool_ops->get_link_ksettings(),
> I just look at a few of them, it seems good.

Yep, you're right. There are some get_link_ksettings implementations that will 
lock
a mutex. I'm changing the implementation to avoid that.

Thanks for catching this up.

--
Dorileo

Reply via email to