From: Haiyang Zhang Date: Thu, 21 Apr 2016 23:13:01 +0000 (-0700) Subject: hv_netvsc: Fix the list processing for network change event X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15cfd40771e18a4e9b788c64c9db2606f958b93d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git hv_netvsc: Fix the list processing for network change event RNDIS_STATUS_NETWORK_CHANGE event is handled as two "half events" -- media disconnect & connect. The second half should be added to the list head, not to the tail. So all events are processed in normal order. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Reviewed-by: Vitaly Kuznetsov Signed-off-by: David S. Miller --- diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index bfdb568ac6b8..ba3f3f3d48ef 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1125,7 +1125,7 @@ static void netvsc_link_change(struct work_struct *w) netif_tx_stop_all_queues(net); event->event = RNDIS_STATUS_MEDIA_CONNECT; spin_lock_irqsave(&ndev_ctx->lock, flags); - list_add_tail(&event->list, &ndev_ctx->reconfig_events); + list_add(&event->list, &ndev_ctx->reconfig_events); spin_unlock_irqrestore(&ndev_ctx->lock, flags); reschedule = true; }