From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: christian.koenig-5C7GfCeVMHo@public.gmane.org
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/nouveau: move io_reserve_lru handling into the driver v5
Date: Wed, 9 Sep 2020 14:49:24 +0300 [thread overview]
Message-ID: <20200909114924.GA17899@mwanda> (raw)
Hello Christian König,
The patch 141b15e59175: "drm/nouveau: move io_reserve_lru handling
into the driver v5" from Aug 21, 2020, leads to the following static
checker warning:
drivers/gpu/drm/nouveau/nouveau_ttm.c:148 nouveau_ttm_fault()
warn: inconsistent returns '*bo->base.resv'.
drivers/gpu/drm/nouveau/nouveau_ttm.c
126 static vm_fault_t nouveau_ttm_fault(struct vm_fault *vmf)
127 {
128 struct vm_area_struct *vma = vmf->vma;
129 struct ttm_buffer_object *bo = vma->vm_private_data;
130 pgprot_t prot;
131 vm_fault_t ret;
132
133 ret = ttm_bo_vm_reserve(bo, vmf);
134 if (ret)
135 return ret;
136
137 nouveau_bo_del_io_reserve_lru(bo);
138
139 prot = vm_get_page_prot(vma->vm_flags);
140 ret = ttm_bo_vm_fault_reserved(vmf, prot, TTM_BO_VM_NUM_PREFAULT, 1);
141 if (ret == VM_FAULT_RETRY && !(vmf->flags & FAULT_FLAG_RETRY_NOWAIT))
142 return ret;
^^^^^^^^^^
Call dma_resv_unlock() before returning?
143
144 nouveau_bo_add_io_reserve_lru(bo);
145
146 dma_resv_unlock(bo->base.resv);
147
148 return ret;
149 }
regards,
dan carpenter
next reply other threads:[~2020-09-09 11:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 11:49 Dan Carpenter [this message]
2020-09-09 11:59 ` [bug report] drm/nouveau: move io_reserve_lru handling into the driver v5 Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200909114924.GA17899@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.