linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ludovic.desroches@atmel.com (Ludovic Desroches)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH] pinctrl: at91: fix null pointer dereference
Date: Tue, 28 Jul 2015 15:12:53 +0200	[thread overview]
Message-ID: <20150728131253.GA4055@odux.rfo.atmel.com> (raw)
In-Reply-To: <CACRpkdaiwcTzxG=KqPZxk6ijLOE0PAh9ybkNqUYhkmAcQV40eg@mail.gmail.com>

On Tue, Jul 28, 2015 at 02:48:09PM +0200, Linus Walleij wrote:
> On Tue, Jul 28, 2015 at 9:48 AM, Ludovic Desroches
> <ludovic.desroches@atmel.com> wrote:
> 
> > From: David Dueck <davidcdueck@googlemail.com>
> >
> > Not all gpio banks are necessarily enabled, in the current code this can
> > lead to null pointer dereferences.
> >
> > [   51.130000] Unable to handle kernel NULL pointer dereference at virtual address 00000058
> (...)
> >
> > Signed-off-by: David Dueck <davidcdueck@googlemail.com>
> > Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> > Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> > CC: Boris Brezillon <boris.brezillon@free-electrons.com>
> > CC: linux-arm-kernel at lists.infradead.org
> > CC: linux-kernel at vger.kernel.org
> > ---
> >
> > This patch fixes a oops in the kernel because of a NULL pointer in a table.
> > Having a NULL pointer in this table is the normal behavior if a PIO controller
> > is not enabled. So this fix is not a quick and dirty hack, it's usual to skip
> > an entry from a table if it is not filled.
> 
> Fair enough, better too many checks than too few.
> 
> Is this a regression to v4.2 that should go to stable or v4.3 material?

Yes it is a regression from v4.0, it applies well on v4.0.9

Fixes: a0b957f306fa ("pinctrl: at91: allow to have disabled gpio bank")
Cc: stable at vger.kernel.org # 4.0

Thanks

Ludovic

  reply	other threads:[~2015-07-28 13:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 16:06 [PATCH] pinctrl: at91: fix null pointer dereference David Dueck
2015-07-03  9:38 ` Ludovic Desroches
2015-07-07 17:02 ` Alexandre Belloni
2015-07-13  6:14 ` Jean-Christophe PLAGNIOL-VILLARD
2015-07-13 13:00   ` Ludovic Desroches
2015-07-13 20:30     ` Jean-Christophe PLAGNIOL-VILLARD
2015-07-15 13:30       ` Ludovic Desroches
2015-07-28  7:48         ` [RESEND PATCH] " Ludovic Desroches
2015-07-28  8:00           ` Nicolas Ferre
2015-07-28 12:48           ` Linus Walleij
2015-07-28 13:12             ` Ludovic Desroches [this message]
2015-07-30  8:33               ` Sylvain Rochet
2015-07-30  8:49                 ` Ludovic Desroches
2015-07-30  9:16                   ` Sylvain Rochet
2015-08-03  8:19           ` Linus Walleij

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=20150728131253.GA4055@odux.rfo.atmel.com \
    --to=ludovic.desroches@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).