net, neigh: Fix crash in v6 module initialization error path
[sfrench/cifs-2.6.git] / net / core / neighbour.c
index 47931c8be04b80a249eb070c02773587a1ed1bb7..72ba027c34cfea6f38a9e78927c35048ebfe7a7f 100644 (file)
@@ -1779,6 +1779,7 @@ int neigh_table_clear(int index, struct neigh_table *tbl)
 {
        neigh_tables[index] = NULL;
        /* It is not clean... Fix it to unload IPv6 module safely */
+       cancel_delayed_work_sync(&tbl->managed_work);
        cancel_delayed_work_sync(&tbl->gc_work);
        del_timer_sync(&tbl->proxy_timer);
        pneigh_queue_purge(&tbl->proxy_queue);