linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] media: omap3isp: zero-initialize the isp cam_xclk{a,b} initial data
Date: Thu, 14 Jun 2018 15:47:46 +0200	[thread overview]
Message-ID: <20180614134746.GA3893@amd> (raw)
In-Reply-To: <20180609083912.27807-1-javierm@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1159 bytes --]

On Sat 2018-06-09 10:39:12, Javier Martinez Canillas wrote:
> The struct clk_init_data defined in isp_xclk_init() is a variable in the
> stack but it's not explicitly zero-initialized. Because of that, in some
> cases the data structure contains values that confuses the clk framework.
> 
> For example if the flags member has the CLK_IS_CRITICAL bit set, the clk
> framework will wrongly prepare the clock on registration. This leads to
> the isp_xclk_prepare() callback to be called which in turn calls to the
> omap3isp_get() function that increments the isp device reference counter.
> 
> Since this omap3isp_get() call is unexpected, this leads to an unbalanced
> omap3isp_get() call that prevents the requested IRQ to be later enabled,
> due the refcount not being 0 when the correct omap3isp_get() call happens.
> 
> Fixes: 9b28ee3c9122 ("[media] omap3isp: Use the common clock framework")
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Tested-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2018-06-14 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09  8:39 [PATCH] media: omap3isp: zero-initialize the isp cam_xclk{a,b} initial data Javier Martinez Canillas
2018-06-14 13:47 ` Pavel Machek [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=20180614134746.GA3893@amd \
    --to=pavel@ucw.cz \
    --cc=javierm@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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).