History

mshv: Use kfree_rcu in mshv_portid_free

mshv_portid_free() uses synchronize_rcu() followed by kfree() to reclaim port table entries. This blocks the caller until a full RCU grace period elapses, which is unnecessary since the same module already uses the non-blocking kfree_rcu() pattern in mshv_port_table_fini(). Replace with kfree_rcu() to avoid the blocking wait and keep the reclamation strategy consistent across the file.

Stanislav Kinsburskii committed 3 months ago

Commit 5cb5c2f1 parent a9708e51 file · +1 −2Browse files

Unified · Split

drivers/hv/mshv_portid_table.c+1−2
@@ -62,8 +62,7 @@ mshv_portid_free(int port_id) · 61 unmodified lines
62 WARN_ON(!info);62 WARN_ON(!info);
63 idr_unlock(&port_table_idr);63 idr_unlock(&port_table_idr);
64 64
65 synchronize_rcu();65 kfree_rcu(info, portbl_rcu);
66 kfree(info);
67}66}
68 67
69int68int