Commit aceb52aa authored by WenChen's avatar WenChen
Browse files

urma: cannot uninstall uburma driver

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I91DSN


CVE: NA

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

Current reset stop flow will lead to refcnt non 0 of uburma

Fixes: 715feb71 ("ubcore: fix the bug of 20240516_day")
Signed-off-by: default avatarWenChen <chenwen54@huawei.com>
parent fd9560ca
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;