All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] fbdev: sh_mobile_lcdc: Fix destruction of uninitialized mutex
Date: Tue, 07 Apr 2015 13:25:08 +0000	[thread overview]
Message-ID: <5523DAB4.5060301@ti.com> (raw)
In-Reply-To: <1428065428-25473-1-git-send-email-geert+renesas@glider.be>

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

On 03/04/15 15:50, Geert Uytterhoeven wrote:
> If sh_mobile_lcdc_probe() fails after the allocation of driver-private
> data, but before the initialization of all channels, a warning will be
> printed due to the destruction of an uninitialized mutex:
> 
>     WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:116 mutex_destroy+0x5c/0x7c()
>     DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock))
>     ...
>     Backtrace:
>     ...
>     [<c00425b4>] (mutex_destroy) from [<c01d5858>] (sh_mobile_lcdc_remove+0x1bc/0x230)
>      r4:df6a4800 r3:00000000
>     [<c01d569c>] (sh_mobile_lcdc_remove) from [<c01d6620>] (sh_mobile_lcdc_probe+0xd54/0xe28)
> 
> Move the initialization of the mutexes from sh_mobile_lcdc_channel_init()
> to immediately after the allocation of driver-private data to fix this.
> 
> Note that the interrupt number is moved to a new variable "irq", so we
> can reuse the existing variable "i" for iterating over the channels.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/video/fbdev/sh_mobile_lcdcfb.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

Thanks, queued for 4.1.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2015-04-07 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-03 12:50 [PATCH] fbdev: sh_mobile_lcdc: Fix destruction of uninitialized mutex Geert Uytterhoeven
2015-04-04 12:38 ` Laurent Pinchart
2015-04-07 13:25 ` Tomi Valkeinen [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=5523DAB4.5060301@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    /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.