Re: compositing broken in -next (idr bug)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/12/2013 11:03 PM, Jiri Slaby wrote:
> On 02/12/2013 10:55 PM, Jiri Slaby wrote:
>> --- a/drivers/gpu/drm/drm_gem.c
>> +++ b/drivers/gpu/drm/drm_gem.c
>> @@ -453,7 +453,8 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
>>         spin_lock(&dev->object_name_lock);
>>         if (!obj->name) {
>>                 ret = idr_alloc(&dev->object_name_idr, obj, 1, 0,
>> GFP_NOWAIT);
>> -               obj->name = ret;
>> +               if (ret >= 0)
>> +                       obj->name = ret;
>>                 args->name = (uint64_t) obj->name;
>>                 spin_unlock(&dev->object_name_lock);
>>
>> @@ -469,6 +470,7 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
>>         }
>>
>>  err:
>> +       idr_preload_end();
>>         drm_gem_object_unreference_unlocked(obj);
>>         return ret;
> 
> Oh my, maybe: return ret < 0 ? ret : 0... Let's try.

Bull's eye.

--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -459,6 +459,7 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,

                if (ret < 0)
                        goto err;
+               ret = 0;

                /* Allocate a reference for the name table.  */
                drm_gem_object_reference(obj);

-- 
js
suse labs
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux