summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-02-18 21:59:56 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-14 12:00:22 (GMT)
commit48d9fa1ece5ee453d4c08a7feec74c966939a25c (patch)
treecfd58eb3c5d8e4558852076f0f7bdaa1a0a4e9cf /block
parent347d07bf3add9bc1a7d52fad2f8efea61aa75c38 (diff)
downloadlinux-48d9fa1ece5ee453d4c08a7feec74c966939a25c.tar.xz
drm/ttm: fix use-after-free races in vm fault handling
commit 3089c1df10e2931b1d72d2ffa7d86431084c86b3 upstream. The vm fault handler relies on the fact that the VMA owns a reference to the BO. However, once mmap_sem is released, other tasks are free to destroy the VMA, which can lead to the BO being freed. Fix two code paths where that can happen, both related to vm fault retries. Found via a lock debugging warning which flagged &bo->wu_mutex as locked while being destroyed. Fixes: cbe12e74ee4e ("drm/ttm: Allow vm fault retries") Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions