Files
erofs-linux/net/smc
Alexandra Winter 9e4389b003 net/smc: Do not re-initialize smc hashtables
INIT_HLIST_HEAD(&smc_v*_hashinfo.ht) are called after smc_nl_init(),
proto_register() and sock_register(). This can lead to smc_v*_hashinfo.ht
being reset even though hash entries already exist and are being used,
possibly resulting in a corrupted list.

Remove unnecessary and dangerous re-initialisation of smc_v*_hashinfo.ht in
smc_init(); it is implicitly initialised to zero anyhow. Add
HLIST_HEAD_INIT to the definitions for clarity.

Fixes: f16a7dd5cf ("smc: netlink interface for SMC sockets")
Suggested-by: Halil Pasic <[email protected]>
Signed-off-by: Alexandra Winter <[email protected]>
Acked-by: Halil Pasic <[email protected]>
Reviewed-by: Mahanta Jambigi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-05-22 17:38:02 -07:00
..
…
…
…
…
…
…
…
…
…
…
…
…