Commit d558ecbc authored by Junhao He's avatar Junhao He Committed by JiangShui
Browse files

coresight: ultrasoc-smb: Config SMB buffer before register sink

maillist inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ICOU
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git/commit/?h=fixes&id=830a7f54db102c889a3fe1c0a225f369ac05f07f



---------------------------------------------------------------------------

The SMB dirver register the enable/disable sysfs interface in function
smb_register_sink(), however the buffer depends on the following
configuration to work well. So it'll be possible for user to access an
unreset one.

Move the config buffer operation to before register_sink().
Ignore the return value, if smb_config_inport() fails. That will
cause the hardwares disable trace path to fail, should not affect
SMB driver remove. So we make smb_remove() return success,

Fixes: 06f5c292 ("drivers/coresight: Add UltraSoc System Memory Buffer driver")
Signed-off-by: default avatarJunhao He <hejunhao3@huawei.com>
Reviewed-by: default avatarJames Clark <james.clark@arm.com>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarCai Jian <caijian11@h-partners.com>
Link: https://lore.kernel.org/r/20231114133346.30489-3-hejunhao3@huawei.com
parent c05a5ac0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment