linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Andrzej Hajda <a.hajda@samsung.com>
Subject: Re: [PATCH] media: s5p-mfc: fix incorrect bus assignment in virtual child device
Date: Mon, 07 Jan 2019 16:29:02 +0100	[thread overview]
Message-ID: <2051667.E519KkqpxJ@acerlaptop> (raw)
In-Reply-To: <20190107120414.30622-1-m.szyprowski@samsung.com>

Dnia poniedziałek, 7 stycznia 2019 13:04:14 CET Marek Szyprowski pisze:
> Virtual MFC codec's child devices must not be assigned to platform bus,
> because they are allocated as raw 'struct device' and don't have the
> corresponding 'platform' part. This fixes NULL pointer access revealed
> recently by commit a66d972465d1 ("devres: Align data[] to
> ARCH_KMALLOC_MINALIGN").
> 
> Reported-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> Fixes: c79667dd93b0 ("media: s5p-mfc: replace custom reserved memory handling code with generic one")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index 927a1235408d..ca11f8a7569d 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -1089,7 +1089,6 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
>  	device_initialize(child);
>  	dev_set_name(child, "%s:%s", dev_name(dev), name);
>  	child->parent = dev;
> -	child->bus = dev->bus;
>  	child->coherent_dma_mask = dev->coherent_dma_mask;
>  	child->dma_mask = dev->dma_mask;
>  	child->release = s5p_mfc_memdev_release;
> 

Checked on Samsung Galaxy S and not it's not crashing anymore. Thanks for patch.
Tested-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>




      reply	other threads:[~2019-01-07 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190107120420eucas1p179b227d5ff0e040540ed9f48573e6e73@eucas1p1.samsung.com>
2019-01-07 12:04 ` [PATCH] media: s5p-mfc: fix incorrect bus assignment in virtual child device Marek Szyprowski
2019-01-07 15:29   ` Paweł Chmiel [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=2051667.E519KkqpxJ@acerlaptop \
    --to=pawel.mikolaj.chmiel@gmail.com \
    --cc=a.hajda@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=s.nawrocki@samsung.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).