drm/radeon/vm: don't attempt to update ptes if ib allocation fails
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Nov 2013 20:25:35 +0000 (15:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:06:29 +0000 (11:06 -0800)
commit206f5b14fe2a7d11cd44cba804501ba49fce5559
treeacdd92868a3e1db07d4df98584e22b804d3be7a5
parentb7aade53e155d4be26e4a87a0957e694dfd5700d
drm/radeon/vm: don't attempt to update ptes if ib allocation fails

commit 4cc948b94a222c310ae089c36718aac7a03aec90 upstream.

If we fail to allocate an indirect buffer (ib) when updating
the ptes, return an error instead of trying to use the ib.
Avoids a null pointer dereference.

Bug:
https://bugzilla.kernel.org/show_bug.cgi?id=58621

v2 (chk): rebased on drm-fixes-3.12 for stable inclusion

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>
drivers/gpu/drm/radeon/radeon_gart.c