Unverified Commit dbd6a8b1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9244 urma: cannot uninstall uburma driver

Merge Pull Request from: @chen-wen1s 
 
Current reset stop flow will lead to refcnt non 0 of uburma 
 
Link:https://gitee.com/openeuler/kernel/pulls/9244

 

Reviewed-by: default avatarChunzhi Hu <huchunzhi@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 07336c70 aceb52aa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -49,11 +49,12 @@ void uburma_unmap_vma_pages(struct uburma_file *ufile)
	lockdep_assert_held(&ufile->cleanup_rwsem);

	while (1) {
		mm = NULL;
		mutex_lock(&ufile->umap_mutex);
		list_for_each_entry_safe(priv, next_priv, &ufile->umaps_list, node) {
			mm = priv->vma->vm_mm;
			ret = mmget_not_zero(mm);
			if (ret != 0) {
			if (!ret) {
				list_del_init(&priv->node);
				mm = NULL;
				continue;