On 08/22/2014 07:34 PM, Jan Kara wrote:
> On Fri 22-08-14 18:01:09, Hans Verkuil wrote:
>> Commit f035eb4e976ef5a059e30bc91cfd310ff030a7d3 (videobuf2: fix lockdep 
>> warning)
>> unfortunately removed the mmap_sem lock that is needed around the call to
>> __qbuf_userptr. Amazingly nobody noticed this until Jan Kara pointed this out
>> to me.
>>
>> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
>> Reported-by: Jan Kara <j...@suse.cz>
> ...
>> @@ -1627,7 +1628,9 @@ static int __buf_prepare(struct vb2_buffer *vb, const 
>> struct v4l2_buffer *b)
>>              ret = __qbuf_mmap(vb, b);
>>              break;
>>      case V4L2_MEMORY_USERPTR:
>   I guess you are missing something like:
> 
> mmap_sem = &current->mm->mmap_sem;

Insert <red face>.

Oops, I'll repost.

Regards,

        Hans

> 
>                                                               Honza
>> +            down_read(mmap_sem);
>>              ret = __qbuf_userptr(vb, b);
>> +            up_read(mmap_sem);
>>              break;
>>      case V4L2_MEMORY_DMABUF:
>>              ret = __qbuf_dmabuf(vb, b);
>> -- 
>> 2.0.1
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to