From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jan Kara <jack@suse.cz>
Cc: LMML <linux-media@vger.kernel.org>,
m.szyprowski@samsung.com, pawel@osciak.com,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] videobuf2-core: take mmap_sem before calling __qbuf_userptr
Date: Fri, 22 Aug 2014 23:24:57 +0000 [thread overview]
Message-ID: <53F7D149.9090604@xs4all.nl> (raw)
In-Reply-To: <20140822193400.GB12839@quack.suse.cz>
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.verkuil@cisco.com>
>> Reported-by: Jan Kara <jack@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 = ¤t->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
>>
prev parent reply other threads:[~2014-08-22 23:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 18:01 [PATCH] videobuf2-core: take mmap_sem before calling __qbuf_userptr Hans Verkuil
2014-08-22 18:58 ` Laurent Pinchart
2014-08-22 19:34 ` Jan Kara
2014-08-22 23:24 ` Hans Verkuil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F7D149.9090604@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=jack@suse.cz \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=pawel@osciak.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).