From: Qi Tao taoqi10@huawei.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I82ARL CVE: NA
------------------------------------------------------------------
cancel the reference counting of the accelerator device so that the device (with hardware errors) isolation stragety can also be modified while the accelerator is running a task.
Signed-off-by: Qi Tao taoqi10@huawei.com Signed-off-by: JiangShui Yang yangjiangshui@h-partners.com --- drivers/misc/uacce/uacce.c | 5 ----- include/linux/uacce.h | 2 -- 2 files changed, 7 deletions(-)
diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 21a4f5892aff..7a64eed01df7 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -88,7 +88,6 @@ static int uacce_put_queue(struct uacce_queue *q) uacce->ops->put_queue(q);
q->state = UACCE_Q_ZOMBIE; - atomic_dec(&uacce->ref);
return 0; } @@ -348,7 +347,6 @@ static int uacce_fops_open(struct inode *inode, struct file *filep) goto out_with_bond; }
- atomic_inc(&uacce->ref); init_waitqueue_head(&q->wait); filep->private_data = q; q->state = UACCE_Q_INIT; @@ -821,9 +819,6 @@ static ssize_t isolate_strategy_store(struct device *dev, struct device_attribut if (val > UACCE_MAX_ERR_THRESHOLD) return -EINVAL;
- if (atomic_read(&uacce->ref)) - return -EBUSY; - ret = uacce->ops->isolate_err_threshold_write(uacce, val); if (ret) return ret; diff --git a/include/linux/uacce.h b/include/linux/uacce.h index 8187c1bda236..9b0c04a9cff7 100644 --- a/include/linux/uacce.h +++ b/include/linux/uacce.h @@ -148,7 +148,6 @@ struct uacce_queue { * @mutex: protects uacce operation * @priv: private pointer of the uacce * @queues: list of queues - * @ref: reference of the uacce */ struct uacce_device { const char *algs; @@ -164,7 +163,6 @@ struct uacce_device { struct device dev; struct mutex mutex; void *priv; - atomic_t ref; struct uacce_err_isolate *isolate; struct list_head queues; };
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/2211 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/J...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/2211 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/J...