linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: "Vincent Stehlé" <vincent.stehle@laposte.net>,
	linux-media@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [PATCH next] [media] vb2: Fix allocation size of dma_parms
Date: Tue, 19 Jul 2016 10:42:20 +0200	[thread overview]
Message-ID: <c501ff83-b74c-0be0-7a97-19a406074ea3@samsung.com> (raw)
In-Reply-To: <1468864444-19053-1-git-send-email-vincent.stehle@laposte.net>

Hi


On 2016-07-18 19:54, Vincent Stehlé wrote:
> When allocating memory to hold the device dma parameters in
> vb2_dma_contig_set_max_seg_size(), the requested size is by mistake only
> the size of a pointer. Request the correct size instead.
>
> Fixes: 3f0339691896 ("media: vb2-dma-contig: add helper for setting dma max seg size")
> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>

I'm really sorry for such silly mistake. Thanks for spotting this issue.

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>
>
> Hi,
>
> I saw that in linux next-20160718.
>
> Best regards,
>
> Vincent.
>
>
>   drivers/media/v4l2-core/videobuf2-dma-contig.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c b/drivers/media/v4l2-core/videobuf2-dma-contig.c
> index b09b2c9..59fa204 100644
> --- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
> +++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
> @@ -743,7 +743,7 @@ EXPORT_SYMBOL_GPL(vb2_dma_contig_memops);
>   int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size)
>   {
>   	if (!dev->dma_parms) {
> -		dev->dma_parms = kzalloc(sizeof(dev->dma_parms), GFP_KERNEL);
> +		dev->dma_parms = kzalloc(sizeof(*dev->dma_parms), GFP_KERNEL);
>   		if (!dev->dma_parms)
>   			return -ENOMEM;
>   	}

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2016-07-19  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24  7:16 [PATCH v5 0/2] vb2-dma-contig: configure DMA max segment size properly Marek Szyprowski
2016-05-24  7:16 ` [PATCH v5 1/2] media: vb2-dma-contig: add helper for setting dma max seg size Marek Szyprowski
2016-07-18 17:54   ` [PATCH next] [media] vb2: Fix allocation size of dma_parms Vincent Stehlé
2016-07-19  8:42     ` Marek Szyprowski [this message]
2016-05-24  7:16 ` [PATCH v5 2/2] media: set proper max seg size for devices on Exynos SoCs Marek Szyprowski

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=c501ff83-b74c-0be0-7a97-19a406074ea3@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=vincent.stehle@laposte.net \
    /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).