|
@@ -2121,12 +2121,15 @@ void ip6t_unregister_table(struct xt_table *table)
|
|
{
|
|
{
|
|
struct xt_table_info *private;
|
|
struct xt_table_info *private;
|
|
void *loc_cpu_entry;
|
|
void *loc_cpu_entry;
|
|
|
|
+ struct module *table_owner = table->me;
|
|
|
|
|
|
private = xt_unregister_table(table);
|
|
private = xt_unregister_table(table);
|
|
|
|
|
|
/* Decrease module usage counts and free resources */
|
|
/* Decrease module usage counts and free resources */
|
|
loc_cpu_entry = private->entries[raw_smp_processor_id()];
|
|
loc_cpu_entry = private->entries[raw_smp_processor_id()];
|
|
IP6T_ENTRY_ITERATE(loc_cpu_entry, private->size, cleanup_entry, NULL);
|
|
IP6T_ENTRY_ITERATE(loc_cpu_entry, private->size, cleanup_entry, NULL);
|
|
|
|
+ if (private->number > private->initial_entries)
|
|
|
|
+ module_put(table_owner);
|
|
xt_free_table_info(private);
|
|
xt_free_table_info(private);
|
|
}
|
|
}
|
|
|
|
|