Loading
scsi: hisi_sas: Create trigger_dump at the end of the debugfs initialization
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB5FF2 CVE: NA --------------------------------------------------------------------- In the current debugfs initialization process, the interface trigger_dump is created first, and then the dump directory is created to store the register dump information. The issue is that after the trigger_dump interface is created, users can access the interface to trigger dump and call debugfs_create_files_v3_hw(). In debugfs_create_files_v3_hw(), if .debugfs_dump_dentry is NULL, the file for storing dump information is created under /sys/kernel/debug, and the memory and information cannot be released after the driver is uninstalled. Therefore, the creation of the trigger_dump interface is placed at the end of debugfs initialization. Fixes: 623a4b6d ("scsi: hisi_sas: Move debugfs code to v3 hw driver") Signed-off-by:Yihang Li <liyihang9@huawei.com> Link: https://lore.kernel.org/r/20241008021822.2617339-3-liyihang9@huawei.com Reviewed-by:
Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Bing Xia <xiabing12@h-partners.com>