--- y/net/batman-adv/network-coding.c +++ n/net/batman-adv/network-coding.c @@ -396,11 +396,13 @@ static void batadv_nc_purge_orig_hash(st struct batadv_hashtable *hash = bat_priv->orig_hash; struct hlist_head *head; struct batadv_orig_node *orig_node; + unsigned long j; u32 i; if (!hash) return; + j = jiffies; /* For each orig_node */ for (i = 0; i < hash->size; i++) { head = &hash->table[i]; @@ -410,6 +412,11 @@ static void batadv_nc_purge_orig_hash(st batadv_nc_purge_orig(bat_priv, orig_node, batadv_nc_to_purge_nc_node); rcu_read_unlock(); + + if (j + 2 < jiffies) { + schedule_timeout_idle(1); + j = jiffies; + } } }