mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 23:25:13 -04:00
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. Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Reviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
committed by
Wei Liu
parent
a9708e550d
commit
5cb5c2f4a8
@@ -62,8 +62,7 @@ mshv_portid_free(int port_id)
|
||||
WARN_ON(!info);
|
||||
idr_unlock(&port_table_idr);
|
||||
|
||||
synchronize_rcu();
|
||||
kfree(info);
|
||||
kfree_rcu(info, portbl_rcu);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user