radeon/kms: fix dma relocation checking
authorJerome Glisse <jglisse@redhat.com>
Wed, 9 Jan 2013 21:40:42 +0000 (16:40 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 10 Jan 2013 22:05:38 +0000 (17:05 -0500)
commit9305ede6afe2998b391cd225e02a18f37d62028e
tree3f5256256b89fe06c94a23fa8f29fb792799ea15
parent51861d4eebc2ddc25c77084343d060fa79f6e291
radeon/kms: fix dma relocation checking

We were checking the index against the size of the relocation buffer
instead of against the last index. This fix kernel segfault when
userspace submit ill formated command stream/relocation buffer pair.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/r600_cs.c