From: Hans Verkuil <hansverk@cisco.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-media@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Pawel Osciak <pawel@osciak.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] media: vb2: add a check if queued userptr buffer is large enough
Date: Wed, 10 Aug 2011 10:45:36 +0200 [thread overview]
Message-ID: <201108101045.36681.hansverk@cisco.com> (raw)
In-Reply-To: <1312964488-2924-1-git-send-email-m.szyprowski@samsung.com>
Just one comment:
On Wednesday, August 10, 2011 10:21:28 Marek Szyprowski wrote:
> Videobuf2 accepted any userptr buffer without verifying if its size is
> large enough to store the video data from the driver. The driver reports
> the minimal size of video data once in queue_setup and expects that
> videobuf2 provides buffers that match these requirements. This patch
> adds the required check.
>
> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> CC: Pawel Osciak <pawel@osciak.com>
> ---
> drivers/media/video/videobuf2-core.c | 41
+++++++++++++++++++--------------
> include/media/videobuf2-core.h | 1 +
> 2 files changed, 25 insertions(+), 17 deletions(-)
>
<snip>
> diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
> index f87472a..496d6e5 100644
> --- a/include/media/videobuf2-core.h
> +++ b/include/media/videobuf2-core.h
> @@ -276,6 +276,7 @@ struct vb2_queue {
> wait_queue_head_t done_wq;
>
> void *alloc_ctx[VIDEO_MAX_PLANES];
> + unsigned long plane_sizes[VIDEO_MAX_PLANES];
Why unsigned long when it is a u32 in struct v4l2_plane_pix_format?
unsigned long is 64 bit on a 64-bit OS, so that seems wasteful to me.
Regards,
Hans
>
> unsigned int streaming:1;
>
> --
> 1.7.1.569.g6f426
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2011-08-10 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 8:21 [PATCH] media: vb2: add a check if queued userptr buffer is large enough Marek Szyprowski
2011-08-10 8:45 ` Hans Verkuil [this message]
2011-08-10 9:08 ` Marek Szyprowski
2011-08-10 9:56 ` Hans Verkuil
2011-08-15 12:56 ` Laurent Pinchart
2011-09-30 13:35 ` Tomasz Stanislawski
2011-10-03 7:21 ` [PATCH] media: vb2: fix incorrect return value Marek Szyprowski
2011-10-19 6:03 ` Pawel Osciak
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=201108101045.36681.hansverk@cisco.com \
--to=hansverk@cisco.com \
--cc=kyungmin.park@samsung.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.