On Tue, 19 Jan 2021 11:11:58 -0800 Jakub Kicinski wrote:
> @@ -10644,15 +10642,6 @@ EXPORT_SYMBOL(unregister_netdevice_queue);
>   *  we force a list_del() to make sure stack wont be corrupted later.
>   */
>  void unregister_netdevice_many(struct list_head *head)
> -{
> -     if (!list_empty(head)) {
> -             rollback_registered_many(head);
> -             list_del(head);

Obliviously missed the list_del() here, sorry for the noise :/

> -     }
> -}
> -EXPORT_SYMBOL(unregister_netdevice_many);
> -
> -static void rollback_registered_many(struct list_head *head)
>  {
>       struct net_device *dev, *tmp;
>       LIST_HEAD(close_head);
> @@ -10660,6 +10649,9 @@ static void rollback_registered_many(struct list_head 
> *head)
>       BUG_ON(dev_boot_phase);
>       ASSERT_RTNL();
>  
> +     if (list_empty(head))
> +             return;
> +
>       list_for_each_entry_safe(dev, tmp, head, unreg_list) {
>               /* Some devices call without registering
>                * for initialization unwind. Remove those
> @@ -10744,6 +10736,7 @@ static void rollback_registered_many(struct list_head 
> *head)
>               net_set_todo(dev);
>       }
>  }
> +EXPORT_SYMBOL(unregister_netdevice_many);

Reply via email to