Skip to content

Commit 9277e14

Browse files
committed
Solved bug on module remotion
1 parent 6388358 commit 9277e14

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lunatik_core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,16 @@ static void __net_exit lunatik_instanceclose(struct net *net)
213213
{
214214
struct lunatik_instance *instance;
215215
lunatik_State *s;
216-
struct hlist_node *tmp;
217216
int bkt;
218217

219218
instance = lunatik_pernet(net);
220219

221220
spin_lock_bh(&(instance->statestable_lock));
222221

223-
hash_for_each_safe(instance->states_table, bkt, tmp, s, node) {
222+
hash_for_each(instance->states_table, bkt, s, node) {
224223
state_destroy(s);
224+
if (hash_empty(instance->states_table))
225+
break;
225226
}
226227

227228
spin_unlock_bh(&(instance->statestable_lock));

0 commit comments

Comments
 (0)