]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ldmvsw: stop the clean timer at beginning of remove
authorShannon Nelson <shannon.nelson@oracle.com>
Mon, 15 May 2017 17:51:08 +0000 (10:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 May 2017 19:36:08 +0000 (15:36 -0400)
Stop the clean timer earlier to be sure there's no asynchronous
interference while stopping the port.

Orabug: 25748241

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/ldmvsw.c

index 309747c7b8ae57e13802005ddaf498bbaa1897e5..5b56c24b6ed2e0c45b5a40d32941527bb1539390 100644 (file)
@@ -411,6 +411,7 @@ static int vsw_port_remove(struct vio_dev *vdev)
 
        if (port) {
                del_timer_sync(&port->vio.timer);
+               del_timer_sync(&port->clean_timer);
 
                napi_disable(&port->napi);
                unregister_netdev(port->dev);
@@ -418,7 +419,6 @@ static int vsw_port_remove(struct vio_dev *vdev)
                list_del_rcu(&port->list);
 
                synchronize_rcu();
-               del_timer_sync(&port->clean_timer);
                spin_lock_irqsave(&port->vp->lock, flags);
                sunvnet_port_rm_txq_common(port);
                spin_unlock_irqrestore(&port->vp->lock, flags);