
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC9UQB CVE: NA ---------------------------------------------------------------------- The uacce supports device isolation feature. If the driver supports the isolate_err_threshold_read and isolate_err_threshold_write operations, uacce creates a sysfs file. Users can read and configure isolation strategy by sysfs. The sysfs file is created when isolate_err_threshold_read or isolate_err_threshold_write exists, which may cause panic. The sysfs is created only when both isolate_err_threshold_read and isolate_err_threshold_write exist. Fixes: e3e289fbc0b5 ("uacce: supports device isolation feature") Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com> --- drivers/misc/uacce/uacce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index ac1b2ec3ec16..8333a81343b9 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -886,7 +886,7 @@ static umode_t uacce_dev_is_visible(struct kobject *kobj, return 0; if (attr == &dev_attr_isolate_strategy.attr && - (!uacce->ops->isolate_err_threshold_read && + (!uacce->ops->isolate_err_threshold_read || !uacce->ops->isolate_err_threshold_write)) return 0; -- 2.33.0