+60
−43
Loading
Previously, non-generic attributes (polling_interval, timer) used separate create/delete logic, leading to race conditions during concurrent access in creation/deletion. Multi-threaded operations also caused inconsistencies between governor capabilities and attribute states. 1.Use is_visible + sysfs_update_group() to unify management of these attributes, eliminating creation/deletion races. 2.Add locks and validation to these attributes, ensuring consistency between current governor capabilities and attribute operations in multi-threaded environments. Reviewed-by:Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by:
Jie Zhan <zhanjie9@hisilicon.com> Signed-off-by:
Pengjie Zhang <zhangpengjie2@huawei.com> Signed-off-by:
Chanwoo Choi <cw00.choi@samsung.com> Link: https://www.spinics.net/lists/kernel/msg5967745.html