mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-11 02:59:12 +00:00
drm/i915/gvt: do not let pin count of shadow mm go negative
[ Upstream commit663a50ceac
] shadow mm's pin count got increased in workload preparation phase, which is after workload scanning. it will get decreased in complete_current_workload() anyway after workload completion. Sometimes, if a workload meets a scanning error, its shadow mm pin count will not get increased but will get decreased in the end. This patch lets shadow mm's pin count not go below 0. Fixes:2707e44466
("drm/i915/gvt: vGPU graphics memory virtualization") Cc: zhenyuw@linux.intel.com Cc: stable@vger.kernel.org #4.14+ Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
646f8e01fc
commit
8ad895bf4b
1 changed files with 1 additions and 1 deletions
|
@ -1940,7 +1940,7 @@ void _intel_vgpu_mm_release(struct kref *mm_ref)
|
|||
*/
|
||||
void intel_vgpu_unpin_mm(struct intel_vgpu_mm *mm)
|
||||
{
|
||||
atomic_dec(&mm->pincount);
|
||||
atomic_dec_if_positive(&mm->pincount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue