mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy TARREAU <wtarreau@haproxy.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/13] Add HD44780 Character LCD support
Date: Thu, 23 Mar 2017 18:37:18 +0100	[thread overview]
Message-ID: <20170323173718.GA9942@haproxy.com> (raw)
In-Reply-To: <20170323171501.GI9408@haproxy.com>

Hi again,

On Thu, Mar 23, 2017 at 06:15:01PM +0100, Willy TARREAU wrote:
> So I finally had the time to give it a try by applying your patchset
> on top of our 4.9 prod kernel. For now I'm getting a panic at boot :
> 
> BUG: unable to handle kernel NULL pointer dereference at           (null)
> IP: [<ffffffff813e203d>] __mutex_lock_slowpath+0x6d/0x100
(...)

It was indeed related to the backlight mutex. It's initialized
after charlcd_init_display() succeeds, but the backlight is
touched within this function. I just moved it upwards and that
solved the issue. Feel free to re-integrate this (or an equivalent)
into your patch.

With only this fix, everything works fine here without even
having to touch the configuration, good job!

Thanks!
Willy
--

diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 6aea900..e7f1bfe 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -703,6 +703,8 @@ static int charlcd_init(struct charlcd *lcd)
 	struct charlcd_priv *priv = to_priv(lcd);
 	int ret;
 
+	mutex_init(&priv->bl_tempo_lock);
+
 	/*
 	 * before this line, we must NOT send anything to the display.
 	 * Since charlcd_init_display() needs to write data, we have to
@@ -713,7 +715,6 @@ static int charlcd_init(struct charlcd *lcd)
 		return ret;
 
 	if (lcd->ops->backlight) {
-		mutex_init(&priv->bl_tempo_lock);
 		INIT_DELAYED_WORK(&priv->bl_work, charlcd_bl_off);
 	}
 

  reply	other threads:[~2017-03-23 17:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 14:38 Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 01/13] misc: panel: Fix LCD_FLAG_F/LCD_FLAG_N exchange Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 02/13] misc: panel: Remove PANEL_VERSION Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 03/13] misc: panel: Remove unused LCD_FLAG_S and LCD_FLAG_ID Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 04/13] misc: panel: Remove reference to misc device support Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 05/13] misc: panel: Move all suboptions into a big if section Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 06/13] misc: panel: Remove always-true check from panel_detach() Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 07/13] misc: panel: Add lcd_home() helper Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 08/13] misc: panel: Abstract temporary backlight handling Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 09/13] auxdisplay: charlcd: Extract character LCD core from misc/panel Geert Uytterhoeven
2017-02-06 15:09   ` Arnd Bergmann
2017-02-06 15:18     ` Geert Uytterhoeven
2017-02-08 12:22   ` Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 10/13] auxdisplay: charlcd: Add support for 4-bit interfaces Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 11/13] auxdisplay: charlcd: Add support for displays with more than two lines Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 12/13] dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 Geert Uytterhoeven
2017-02-09  1:11   ` Rob Herring
2017-02-09  8:51     ` Geert Uytterhoeven
2017-02-06 14:38 ` [PATCH 13/13] auxdisplay: Add HD44780 Character LCD support Geert Uytterhoeven
2017-02-07 11:23   ` Andy Shevchenko
2017-02-08 13:18     ` Geert Uytterhoeven
2017-02-08 13:38       ` Andy Shevchenko
2017-02-08 13:41         ` Geert Uytterhoeven
2017-02-08 16:27           ` Andy Shevchenko
2017-02-08 17:19             ` Geert Uytterhoeven
2017-02-06 15:09 ` [PATCH 00/13] " Willy TARREAU
2017-02-10 14:37 ` Greg Kroah-Hartman
2017-03-16 20:50 ` Linus Walleij
2017-03-17  7:40   ` Geert Uytterhoeven
2017-03-23 17:15 ` Willy TARREAU
2017-03-23 17:37   ` Willy TARREAU [this message]
2017-03-23 18:49     ` Geert Uytterhoeven
2017-03-23 19:03       ` Willy TARREAU
2017-03-23 20:29         ` Geert Uytterhoeven

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=20170323173718.GA9942@haproxy.com \
    --to=wtarreau@haproxy.com \
    --cc=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.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

Powered by JetHome