Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965749AbdCWSt5 (ORCPT ); Thu, 23 Mar 2017 14:49:57 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:33088 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbdCWStz (ORCPT ); Thu, 23 Mar 2017 14:49:55 -0400 MIME-Version: 1.0 In-Reply-To: <20170323173718.GA9942@haproxy.com> References: <1486391895-9554-1-git-send-email-geert@linux-m68k.org> <20170323171501.GI9408@haproxy.com> <20170323173718.GA9942@haproxy.com> From: Geert Uytterhoeven Date: Thu, 23 Mar 2017 19:49:53 +0100 X-Google-Sender-Auth: SK_xv-5vj9TA3BAjCsNyHwRGRZM Message-ID: Subject: Re: [PATCH 00/13] Add HD44780 Character LCD support To: Willy TARREAU Cc: Miguel Ojeda Sandonis , Greg Kroah-Hartman , Ksenija Stanojevic , Arnd Bergmann , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2283 Lines: 68 Hi Willy, On Thu, Mar 23, 2017 at 6:37 PM, Willy TARREAU wrote: > 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: [] __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 for testing! > > 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); > } I take it you're using v1 of the patchset? v2 had this change: - Move backlight mutex initialization before call to charlcd_init_display(), to prevent locking an uninitialized mutex (reported by 0day). https://lkml.org/lkml/2017/3/10/1151 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds