diff mbox

[1/2] drm/radeon: fix fence related segfault in CS

Message ID 1343735331-4922-1-git-send-email-deathsimple@vodafone.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christian König July 31, 2012, 11:48 a.m. UTC
Don't return success if scheduling the IB fails, otherwise
we end up with an oops in ttm_eu_fence_buffer_objects.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/radeon/radeon_cs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michel Dänzer July 31, 2012, 2:47 p.m. UTC | #1
On Die, 2012-07-31 at 13:48 +0200, Christian König wrote: 
> Don't return success if scheduling the IB fails, otherwise
> we end up with an oops in ttm_eu_fence_buffer_objects.
> 
> Signed-off-by: Christian König <deathsimple@vodafone.de>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/radeon/radeon_cs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 142f894..17238f4 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -377,7 +377,7 @@ static int radeon_cs_ib_chunk(struct radeon_device *rdev,
>  	if (r) {
>  		DRM_ERROR("Failed to schedule IB !\n");
>  	}
> -	return 0;
> +	return r;
>  }
>  
>  static int radeon_bo_vm_update_pte(struct radeon_cs_parser *parser,

AFAICT this fix is already in Linus' tree (commit
93bf888c5c730605e3470f5d2381f296eda88d79).
Christian König July 31, 2012, 3:05 p.m. UTC | #2
On 31.07.2012 16:47, Michel Dänzer wrote:
> On Die, 2012-07-31 at 13:48 +0200, Christian König wrote:
>> Don't return success if scheduling the IB fails, otherwise
>> we end up with an oops in ttm_eu_fence_buffer_objects.
>>
>> Signed-off-by: Christian König <deathsimple@vodafone.de>
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>> Cc: stable@vger.kernel.org
>> ---
>>   drivers/gpu/drm/radeon/radeon_cs.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
>> index 142f894..17238f4 100644
>> --- a/drivers/gpu/drm/radeon/radeon_cs.c
>> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
>> @@ -377,7 +377,7 @@ static int radeon_cs_ib_chunk(struct radeon_device *rdev,
>>   	if (r) {
>>   		DRM_ERROR("Failed to schedule IB !\n");
>>   	}
>> -	return 0;
>> +	return r;
>>   }
>>   
>>   static int radeon_bo_vm_update_pte(struct radeon_cs_parser *parser,
> AFAICT this fix is already in Linus' tree (commit
> 93bf888c5c730605e3470f5d2381f296eda88d79).

Your right, but why the heck isn't it in drm-fixes?

Christian.
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 142f894..17238f4 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -377,7 +377,7 @@  static int radeon_cs_ib_chunk(struct radeon_device *rdev,
 	if (r) {
 		DRM_ERROR("Failed to schedule IB !\n");
 	}
-	return 0;
+	return r;
 }
 
 static int radeon_bo_vm_update_pte(struct radeon_cs_parser *parser,